結果
| 問題 |
No.304 鍵(1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-02 03:22:51 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 566 bytes |
| コンパイル時間 | 1,448 ms |
| コンパイル使用メモリ | 167,044 KB |
| 実行使用メモリ | 40,140 KB |
| 最終ジャッジ日時 | 2024-07-16 15:27:13 |
| 合計ジャッジ時間 | 7,883 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 5 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:21:67: warning: 's' is used uninitialized [-Wuninitialized]
21 | printf("%c%c%c\n", s[0], s[1], s[2]);
| ~~~^
main.cpp:13:14: note: 's' declared here
13 | char s[3];
| ^
ソースコード
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i = (a); i < (b); ++i)
#define REP(i,n) FOR(i,0,n)
#define SZ(n) (int)(n).size()
#define ALL(n) (n).begin(), (n).end()
#define MOD 1000000007
using namespace std;
typedef long long LL;
typedef vector<int> VI;
int main() {
char s[3];
string re;
REP(i, 10) {
s[0] = i;
REP(j, 10) {
s[1] = j;
REP(k, 10) {
s[3] = k;
printf("%c%c%c\n", s[0], s[1], s[2]);
scanf("%s", re);
if (re == "locked") continue;
if (re == "unlocked") return 0;
}
}
}
return 0;
}