結果
問題 | No.264 じゃんけん |
ユーザー | y32M-71693993 |
提出日時 | 2015-10-01 21:55:41 |
言語 | C++11 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 3,438 bytes |
コンパイル時間 | 1,264 ms |
コンパイル使用メモリ | 158,760 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-19 18:55:40 |
合計ジャッジ時間 | 1,577 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
5,248 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | AC | 1 ms
5,376 KB |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:38:27: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 38 | #define SCANF_INT(a) scanf("%d", &(a)); | ~~~~~^~~~~~~~~~~~ main.cpp:10:9: note: in expansion of macro ‘SCANF_INT’ 10 | FIRST(A) NEXT(B) | ^~~~~ main.cpp:5:69: note: in expansion of macro ‘EXPAND_02’ 5 | #define GET_MACRO_09(A1, A2, A3, A4, A5, A6, A7, A8, A9, NAME, ...) NAME | ^~~~ main.cpp:29:28: note: in expansion of macro ‘EXPAND_ADD’ 29 | #define EXPAND(MACRO, ...) EXPAND_ADD(MACRO, MACRO, __VA_ARGS__) | ^~~~~~~~~~ main.cpp:41:33: note: in expansion of macro ‘EXPAND’ 41 | #define I(...) int __VA_ARGS__; EXPAND(SCANF_INT, __VA_ARGS__); | ^~~~~~ main.cpp:95:9: note: in expansion of macro ‘I’ 95 | I(a,b); | ^ main.cpp:38:27: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 38 | #define SCANF_INT(a) scanf("%d", &(a)); | ~~~~~^~~~~~~~~~~~ main.cpp:10:18: note: in expansion of macro ‘SCANF_INT’ 10 | FIRST(A) NEXT(B) | ^~~~ main.cpp:5:69: note: in expansion of macro ‘EXPAND_02’ 5 | #define GET_MACRO_09(A1, A2, A3, A4, A5, A6, A7, A8, A9, NAME, ...) NAME | ^~~~ main.cpp:29:28: note: in expansion of macro ‘EXPAND_ADD’ 29 | #define EXPAND(MACRO, ...) EXPAND_ADD(MACRO, MACRO, __VA_ARGS__) | ^~~~~~~~~~ main.cpp:41:33: note: in expansion of macro ‘EXPAND’ 41 | #define I(...) int __VA_ARGS__; EXPAND(SCANF_INT, __VA_ARGS__); |
ソースコード
#include <bits/stdc++.h> using namespace std; // Macro Tools ///////////////////////////////////////////////////////////////// #define GET_MACRO_09(A1, A2, A3, A4, A5, A6, A7, A8, A9, NAME, ...) NAME #define EXPAND_01(FIRST, NEXT, A) \ FIRST(A) #define EXPAND_02(FIRST, NEXT, A, B) \ FIRST(A) NEXT(B) #define EXPAND_03(FIRST, NEXT, A, B, C) \ FIRST(A) NEXT(B) NEXT(C) #define EXPAND_04(FIRST, NEXT, A, B, C, D) \ FIRST(A) NEXT(B) NEXT(C) NEXT(D) #define EXPAND_05(FIRST, NEXT, A, B, C, D, E) \ FIRST(A) NEXT(B) NEXT(C) NEXT(D) NEXT(E) #define EXPAND_06(FIRST, NEXT, A, B, C, D, E, F) \ FIRST(A) NEXT(B) NEXT(C) NEXT(D) NEXT(E) NEXT(F) #define EXPAND_07(FIRST, NEXT, A, B, C, D, E, F, G) \ FIRST(A) NEXT(B) NEXT(C) NEXT(D) NEXT(E) NEXT(F) NEXT(G) #define EXPAND_08(FIRST, NEXT, A, B, C, D, E, F, G, H) \ FIRST(A) NEXT(B) NEXT(C) NEXT(D) NEXT(E) NEXT(F) NEXT(G) NEXT(H) #define EXPAND_09(FIRST, NEXT, A, B, C, D, E, F, G, H, I) \ FIRST(A) NEXT(B) NEXT(C) NEXT(D) NEXT(E) NEXT(F) NEXT(G) NEXT(H) NEXT(I) #define EXPAND_ADD(FIRST, NEXT, ...) \ GET_MACRO_09(__VA_ARGS__, EXPAND_09, EXPAND_08, EXPAND_07, EXPAND_06, \ EXPAND_05, EXPAND_04, EXPAND_03, EXPAND_02, EXPAND_01) \ (FIRST, NEXT, __VA_ARGS__) #define EXPAND(MACRO, ...) EXPAND_ADD(MACRO, MACRO, __VA_ARGS__) #define Q(x) #x #define QUOTE(x) Q(x) // Input /////////////////////////////////////////////////////////////////////// #define RIGHT_SHIFT_BEFORE(a) >>a #define CAMMA_AND_ADDRESS(a) , &a #define INT_FORMATTER(a) %d #define SCANF_INT(a) scanf("%d", &(a)); // #define SCANF_LL(a) scanf("%I64d", &(a)); #define I(...) int __VA_ARGS__; EXPAND(SCANF_INT, __VA_ARGS__); // #define L(...) long long __VA_ARGS__; EXPAND(SCANF_LL, __VA_ARGS__); #define input(t,v) t v;cin>>v; #define input2(t,v1,v2) t v1,v2;cin>>v1>>v2; #define input3(t,v1,v2,v3) t v1,v2,v3;cin>>v1>>v2>>v3; #if __cplusplus > 199711L //C++11 template<class T=int> #else template<class T> #endif T read() { T t; cin >> t; return t; } // Types /////////////////////////////////////////////////////////////////////// typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef set<int> si; typedef set<ll, ll> sll; typedef vector<int> vi; typedef vector<ll> vll; typedef list<int> li; typedef list<ll> lll; typedef map<int, int> mii; typedef map<int, ll> mil; typedef map<ll, int> mli; typedef map<ll, ll> mll; // Loop & Iteration //////////////////////////////////////////////////////////// #define FOR(i, a, b) for(int i = (a), loop_end_##i=(b); i < (loop_end_##i); i++) #define REP(i, n) FOR(i, 0, n) #define rep(v,n) for(int (v)=0;(v)<(n);(v)++) #define EACH(i,c) for(auto i=(c).begin(); i!=(c).end(); ++i) #define SORT(c) sort((c).begin(),(c).end()) #define EXIST(s,e) ((s).find(e)!=(s).end()) #define PB push_back // Range /////////////////////////////////////////////////////////////////////// #define IN(x, a, b) (a<=x && x<b) int dx[8] = { 1, 0, 0,-1, 1, 1,-1,-1}; int dy[8] = { 0,-1, 1, 0,-1, 1,-1, 1}; // Debug /////////////////////////////////////////////////////////////////////// #define dump(x) cout << #x << " = " << (x) << endl #define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl //////////////////////////////////////////////////////////////////////////////// int main(){ I(a,b); int x = a+3-b; if(x%3==0){ printf("Drew\n"); }else if(x%3==1){ printf("Won\n"); }else{ printf("Lost\n"); } }