結果
| 問題 | No.304 鍵(1) |
| コンテスト | |
| ユーザー |
vain0
|
| 提出日時 | 2015-11-27 22:56:36 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 919 bytes |
| 記録 | |
| コンパイル時間 | 585 ms |
| コンパイル使用メモリ | 77,500 KB |
| 実行使用メモリ | 39,628 KB |
| 最終ジャッジ日時 | 2024-07-16 21:48:41 |
| 合計ジャッジ時間 | 6,954 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 5 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:43:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
43 | scanf("%s", msg);
| ~~~~~^~~~~~~~~~~
ソースコード
#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <functional>
#include <cmath>
#ifndef ONLINE_JUDGE
# include <complex>
# include <random>
# include <array>
# include <unordered_map>
# define mkt make_tuple
#endif
#ifdef _LOCAL
# include "module/for_local.h"
#else
# define assert(...) ((void)0)
# define ifdebug if (false)
# define echo(...) ((void)0)
#endif
using namespace std;
typedef long long ll; typedef unsigned long long ull;
#define repi(_I, _B, _E) for(int _I = (_B); (_I) < (_E); ++ (_I))
#define rep(_I, _N) for(int _I = 0; (_I) < (_N); ++ (_I))
#define all(_X) (_X).begin(), (_X).end()
int main()
{
rep(i, 1000)
{
printf("%03d\n", i);
fflush(stdin);
char msg[100] {};
scanf("%s", msg);
if ( ! strcmp(msg, "unlocked") ) {
break;
}
}
return 0;
}
vain0