結果
問題 | No.355 数当てゲーム(2) |
ユーザー | fmhr |
提出日時 | 2016-04-01 22:54:57 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,803 bytes |
コンパイル時間 | 1,449 ms |
コンパイル使用メモリ | 168,520 KB |
実行使用メモリ | 25,964 KB |
平均クエリ数 | 50.00 |
最終ジャッジ日時 | 2024-07-16 08:59:36 |
合計ジャッジ時間 | 12,253 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | WA | - |
testcase_37 | WA | - |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | WA | - |
testcase_41 | WA | - |
testcase_42 | WA | - |
testcase_43 | WA | - |
testcase_44 | WA | - |
testcase_45 | WA | - |
testcase_46 | WA | - |
testcase_47 | WA | - |
testcase_48 | WA | - |
testcase_49 | WA | - |
testcase_50 | WA | - |
testcase_51 | WA | - |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:51:63: warning: 'unUsed' may be used uninitialized [-Wmaybe-uninitialized] 51 | cout << ans[0] << " " << ans[1] << " " << i << " " << unUsed << endl; | ^~~~~~ main.cpp:23:9: note: 'unUsed' was declared here 23 | int unUsed; | ^~~~~~
ソースコード
#include <bits/stdc++.h> using namespace std; #define _GLIBCXX_DEBUG #define dump(c) cerr << "> " << #c << " = " << (c) << endl #define all(c) ((c).begin()), ((c).end()) #define rep(i,n) for(int i=0;i<n;i++) #define FOR(i,s,e) for(int (i)=(int)(s);(i)<(int)(e);++(i)) #define inf 0x3f3f3f3f #define infl 0x3f3f3f3f3f3f3f3fLL typedef long long ll; typedef unsigned long long ull; void print_array(int a[], int n){rep(i,n){if(i<n-1){cout<<a[i]<<" ";}else{cout<<a[i]<<endl;}}} void print_vector(vector<int> v){rep(i,v.size()){if(i<v.size()-1){cout<<v[i]<<" ";}else{cout<<v[i]<<endl;}}} int main() { array<bool, 10> num = {0}; array<int, 4> ans = {0}; int x, y; int unUsed; for (int i = 0; i < 10; ++i) { cout << i << " " << i << " " << i << " " << i << endl; cin >> x >> y; if (x==0 && y==0){ unUsed = i; }else{ num[i] = false; } } for (int i = 0; i < 10; ++i) { cout << i << " " << unUsed << " " << unUsed << " " << unUsed << endl; cin >> x >> y; if (x == 1){ ans[0] = i; break; } } for (int i = 0; i < 10; ++i) { cout << ans[0] << " " << i << " " << unUsed << " " << unUsed << endl; cin >> x >> y; if (x == 2){ ans[1] = i; break; } } for (int i = 0; i < 10; ++i) { cout << ans[0] << " " << ans[1] << " " << i << " " << unUsed << endl; cin >> x >> y; if (x == 3){ ans[2] = i; break; } } for (int i = 0; i < 10; ++i) { cout << ans[0] << " " << ans[1] << " " << ans[2] << " " << i << endl; cin >> x >> y; if (x == 4){ ans[3] = i; break; } } return 0; }