Submission #213505
Source Code Expand
#define _CRT_SECURE_NO_WARNINGS
#include<cstdio>
#include <iostream>
#include <string>
#include<algorithm>
#include <map>
#include<cstdlib>
#include<cmath>
#include <vector>
#include <queue>
#include <ctime>
#include <string.h>
#pragma warning(disable:4786) // VisualC++6.0の警告対策
using namespace std;
#define ll long long
#define SINT(n) scanf("%d",&n);
#define SINT2(n,m) scanf("%d %d",&n,&m);
#define SINT3(n,m,o) scanf("%d %d %d",&n,&m,&o);
#define SINT4(n,m,o,p) scanf("%d %d %d %d",&n,&m,&o,&p);
#define SLL(n) scanf("%lld",&n);
#define SST(s) scanf("%s",&s);
#define PINT(n) printf("%d",(int)(n));
#define PINT2(n,m) printf("%d %d",(int)(n),(int)(m));
#define PLL(n) printf("%lld",(long long)(n));
#define PLL2(n,m) printf("%lld %lld",(long long)(n),(long long)(m));
#define PLL3(n,m,o) printf("%lld %lld %lld",(long long)(n),(long long)(m),(long long)(o));
#define PST(s) printf("%s",(s));
#define PCH(s) printf("%c",(s));
#define PINTN(n) printf("%d\n",(int)(n));
#define PINT2N(n,m) printf("%d %d\n",(int)(n),(int)(m));
#define PINT3N(n,m,o) printf("%d %d %d\n",(int)(n),(int)(m),(int)(o));
#define PLLN(n) printf("%lld\n",(long long)(n));
#define PLL2N(n,m) printf("%lld %lld\n",(long long)(n),(long long)(m));
#define PLL3N(n,m,o) printf("%lld %lld %lld\n",(long long)(n),(long long)(m),(long long)(o));
#define PSTN(s) printf("%s\n",(s));
#define PCHN(s) printf("%c\n",(s));
#define PSP() printf(" ");
#define PN() printf("\n");
#define dlp(i) while(i-->0)
#define ulp(i) for(int _hoge_counter_hoge_=i,i=0;i<_hoge_counter_hoge_;i++)
#define lp(i) for(int _hoge_counter_hoge_=i;_hoge_counter_hoge_--;)
#define lpp(i,to) for(int i=0;i<to;i++)
#define lpft(i,from,to) for(int i=from;i<to;i++)
#define lengthof(x)
#define FILL(a,v) (a, a + (sizeof (a) / sizeof *(a)), v);
#define FILL0(a) memset(a,0,sizeof(a));
#define FILL1(a) memset(a,-1,sizeof(a));
#define INF 1<<30
typedef pair<ll, unsigned short> P;
template<class T1, class T2, class T3>
struct triple {
T1 first; // 1つ目の値
T2 second; // 2つ目の値
T3 third; // 3つ目の値
// デフォルトコンストラクタ
triple() : first(T1()), second(T2()), third(T3()) {}
// 引数付きコンストラクタ
triple(const T1& a, const T2& b, const T3& c) : first(a), second(b), third(c) {}
};
typedef triple<ll, ll, ll> Tr;
//map<ll, map<ll, short> > memo[50][50][4];
/*
int taxies[5555][2];
vector<int> road[5555]; //隣り合っている街の隣接リスト
priority_queue<P, vector<P>, greater<P> > que;
queue<P> Q;
struct edge {
int to, cost;
edge(int _to, int _cost) {to = _to; cost=_cost;}
};
vector<edge> G[5555];
*/
/*
time_t sec;
time( &sec );
int start_time=(int)sec;
*/
int main() {
int a, b,c;
SINT2(a, b);
a -= b;
if(a < 0)a = 0 - a;
if(a > 5)a = 10 - a;
PINTN(a);
return 0;
}
Submission Info
Submission Time
2014-08-16 21:04:07+0900
Task
B - 錠
User
TumoiYorozu
Language
C++ (G++ 4.6.4)
Score
100
Code Size
2961 Byte
Status
AC
Exec Time
21 ms
Memory
928 KB
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:112:2: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
Judge Result
Set Name
all
Score / Max Score
100 / 100
Status
Set Name
Test Cases
all
0_1.txt, 0_2.txt, 0_3.txt, 0_4.txt, 0_5.txt, 0_6.txt, 0_7.txt, 0_8.txt, 0_9.txt, 1_0.txt, 1_2.txt, 1_3.txt, 1_4.txt, 1_5.txt, 1_6.txt, 1_7.txt, 1_8.txt, 1_9.txt, 2_0.txt, 2_1.txt, 2_3.txt, 2_4.txt, 2_5.txt, 2_6.txt, 2_7.txt, 2_8.txt, 2_9.txt, 3_0.txt, 3_1.txt, 3_2.txt, 3_4.txt, 3_5.txt, 3_6.txt, 3_7.txt, 3_8.txt, 3_9.txt, 4_0.txt, 4_1.txt, 4_2.txt, 4_3.txt, 4_5.txt, 4_6.txt, 4_7.txt, 4_8.txt, 4_9.txt, 5_0.txt, 5_1.txt, 5_2.txt, 5_3.txt, 5_4.txt, 5_6.txt, 5_7.txt, 5_8.txt, 5_9.txt, 6_0.txt, 6_1.txt, 6_2.txt, 6_3.txt, 6_4.txt, 6_5.txt, 6_7.txt, 6_8.txt, 6_9.txt, 7_0.txt, 7_1.txt, 7_2.txt, 7_3.txt, 7_4.txt, 7_5.txt, 7_6.txt, 7_8.txt, 7_9.txt, 8_0.txt, 8_1.txt, 8_2.txt, 8_3.txt, 8_4.txt, 8_5.txt, 8_6.txt, 8_7.txt, 8_9.txt, 9_0.txt, 9_1.txt, 9_2.txt, 9_3.txt, 9_4.txt, 9_5.txt, 9_6.txt, 9_7.txt, 9_8.txt
Case Name
Status
Exec Time
Memory
0_1.txt
AC
21 ms
800 KB
0_2.txt
AC
20 ms
800 KB
0_3.txt
AC
21 ms
840 KB
0_4.txt
AC
20 ms
800 KB
0_5.txt
AC
20 ms
804 KB
0_6.txt
AC
20 ms
676 KB
0_7.txt
AC
21 ms
736 KB
0_8.txt
AC
20 ms
804 KB
0_9.txt
AC
21 ms
800 KB
1_0.txt
AC
21 ms
808 KB
1_2.txt
AC
20 ms
800 KB
1_3.txt
AC
20 ms
800 KB
1_4.txt
AC
19 ms
800 KB
1_5.txt
AC
20 ms
924 KB
1_6.txt
AC
20 ms
804 KB
1_7.txt
AC
21 ms
804 KB
1_8.txt
AC
20 ms
800 KB
1_9.txt
AC
21 ms
924 KB
2_0.txt
AC
20 ms
800 KB
2_1.txt
AC
21 ms
928 KB
2_3.txt
AC
20 ms
804 KB
2_4.txt
AC
20 ms
804 KB
2_5.txt
AC
19 ms
796 KB
2_6.txt
AC
20 ms
800 KB
2_7.txt
AC
21 ms
804 KB
2_8.txt
AC
20 ms
924 KB
2_9.txt
AC
20 ms
804 KB
3_0.txt
AC
20 ms
800 KB
3_1.txt
AC
20 ms
796 KB
3_2.txt
AC
21 ms
744 KB
3_4.txt
AC
21 ms
736 KB
3_5.txt
AC
20 ms
804 KB
3_6.txt
AC
20 ms
672 KB
3_7.txt
AC
21 ms
804 KB
3_8.txt
AC
20 ms
924 KB
3_9.txt
AC
19 ms
928 KB
4_0.txt
AC
21 ms
928 KB
4_1.txt
AC
21 ms
764 KB
4_2.txt
AC
21 ms
804 KB
4_3.txt
AC
20 ms
928 KB
4_5.txt
AC
21 ms
800 KB
4_6.txt
AC
21 ms
800 KB
4_7.txt
AC
21 ms
804 KB
4_8.txt
AC
20 ms
796 KB
4_9.txt
AC
20 ms
800 KB
5_0.txt
AC
21 ms
800 KB
5_1.txt
AC
20 ms
800 KB
5_2.txt
AC
21 ms
928 KB
5_3.txt
AC
20 ms
800 KB
5_4.txt
AC
20 ms
796 KB
5_6.txt
AC
20 ms
752 KB
5_7.txt
AC
20 ms
928 KB
5_8.txt
AC
20 ms
804 KB
5_9.txt
AC
21 ms
732 KB
6_0.txt
AC
20 ms
672 KB
6_1.txt
AC
20 ms
672 KB
6_2.txt
AC
20 ms
800 KB
6_3.txt
AC
20 ms
800 KB
6_4.txt
AC
20 ms
808 KB
6_5.txt
AC
20 ms
920 KB
6_7.txt
AC
20 ms
800 KB
6_8.txt
AC
20 ms
804 KB
6_9.txt
AC
20 ms
804 KB
7_0.txt
AC
20 ms
924 KB
7_1.txt
AC
21 ms
796 KB
7_2.txt
AC
21 ms
800 KB
7_3.txt
AC
20 ms
748 KB
7_4.txt
AC
21 ms
804 KB
7_5.txt
AC
20 ms
808 KB
7_6.txt
AC
20 ms
804 KB
7_8.txt
AC
20 ms
924 KB
7_9.txt
AC
20 ms
804 KB
8_0.txt
AC
21 ms
800 KB
8_1.txt
AC
20 ms
676 KB
8_2.txt
AC
21 ms
804 KB
8_3.txt
AC
20 ms
800 KB
8_4.txt
AC
20 ms
760 KB
8_5.txt
AC
20 ms
804 KB
8_6.txt
AC
21 ms
928 KB
8_7.txt
AC
20 ms
796 KB
8_9.txt
AC
20 ms
800 KB
9_0.txt
AC
20 ms
800 KB
9_1.txt
AC
20 ms
800 KB
9_2.txt
AC
20 ms
800 KB
9_3.txt
AC
20 ms
800 KB
9_4.txt
AC
21 ms
704 KB
9_5.txt
AC
21 ms
872 KB
9_6.txt
AC
21 ms
800 KB
9_7.txt
AC
20 ms
804 KB
9_8.txt
AC
20 ms
756 KB