結果
問題 | No.305 鍵(2) |
ユーザー |
|
提出日時 | 2015-12-31 16:15:00 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 32 ms / 2,000 ms |
コード長 | 834 bytes |
コンパイル時間 | 893 ms |
コンパイル使用メモリ | 92,376 KB |
実行使用メモリ | 25,220 KB |
平均クエリ数 | 86.69 |
最終ジャッジ日時 | 2024-07-16 22:49:03 |
合計ジャッジ時間 | 2,486 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:45:30: warning: ‘c’ may be used uninitialized in this function [-Wmaybe-uninitialized] 45 | s[a] = c;
ソースコード
#include <iostream>#include <algorithm>#include <vector>#include <deque>#include <string>#include <tuple>#include <functional>#include <numeric>#include <cmath>#include <iomanip>#include <map>#include <random>//#include "toollib.h"#define INT_MAX 2147483647#define Loop(i, n) for(int i = 0; i < (int)n; i++)#pragma warning (disable:4018)using namespace std;typedef long long int lint;typedef struct {int x;int y;}coordinate;//***** Main Program *****int main() {string s = "0000000000";int x;string judge;int a, b, c;a = 0;b = -1;do {cout << s << endl;cin >> x >> judge;if (judge == "unlocked") break;if (x > b) {b = x;c = s[a];}if (s[a] < '9') s[a]++;else {s[a] = c;if (a < 9) {a++;b = -1;}else break;}} while (true);return 0;}