結果

問題 No.304 鍵(1)
ユーザー nnasennnasen
提出日時 2017-10-02 03:22:51
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 566 bytes
コンパイル時間 1,663 ms
コンパイル使用メモリ 163,852 KB
実行使用メモリ 36,248 KB
最終ジャッジ日時 2023-09-23 15:41:45
合計ジャッジ時間 7,931 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: 関数 ‘int main()’ 内:
main.cpp:21:67: 警告: ‘s’ is used uninitialized [-Wuninitialized]
   21 |                                 printf("%c%c%c\n", s[0], s[1], s[2]);
      |                                                                ~~~^
main.cpp:13:14: 備考: ‘s’ はここで宣言されています
   13 |         char s[3];
      |              ^

ソースコード

diff #

#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;
}
0