結果
| 問題 | No.481 1から10 |
| コンテスト | |
| ユーザー |
teketeke5000
|
| 提出日時 | 2017-10-25 00:01:14 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 360µs | |
| コード長 | 263 bytes |
| 記録 | |
| コンパイル時間 | 805 ms |
| コンパイル使用メモリ | 176,160 KB |
| 実行使用メモリ | 9,904 KB |
| 最終ジャッジ日時 | 2026-09-27 16:17:16 |
| 合計ジャッジ時間 | 2,060 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:13:13: warning: 'ans' may be used uninitialized [-Wmaybe-uninitialized]
13 | cout << ans << endl;
| ^~~
main.cpp:6:13: note: 'ans' was declared here
6 | int tmp,ans;
| ^~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void) {
int tmp,ans;
for(int i=1; i<=10; i++) {
cin >> tmp;
if (tmp == i) continue;
ans = i;
i++;
}
cout << ans << endl;
return 0;
}
teketeke5000