結果
| 問題 | No.313 π |
| コンテスト | |
| ユーザー |
sugim48
|
| 提出日時 | 2015-09-02 16:51:10 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 365 bytes |
| 記録 | |
| コンパイル時間 | 342 ms |
| コンパイル使用メモリ | 72,652 KB |
| 実行使用メモリ | 79,748 KB |
| 最終ジャッジ日時 | 2026-04-02 12:38:26 |
| 合計ジャッジ時間 | 3,908 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 24 WA * 8 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:16:29: warning: 'y' may be used uninitialized [-Wmaybe-uninitialized]
16 | cout << x << ' ' << y << endl;
| ^
main.cpp:11:16: note: 'y' was declared here
11 | int x, y;
| ^
main.cpp:16:22: warning: 'x' may be used uninitialized [-Wmaybe-uninitialized]
16 | cout << x << ' ' << y << endl;
| ^~~
main.cpp:11:13: note: 'x' was declared here
11 | int x, y;
| ^
ソースコード
#include <iostream>
#include <string>
using namespace std;
int a[10] = {20104, 20063, 19892, 20010, 19874, 20199, 19898, 20163, 19956, 19841};
int main() {
string S; cin >> S;
for (int i = 2; i < S.length(); i++)
a[S[i] - '0']--;
int x, y;
for (int k = 0; k < 10; k++) {
if (a[k] == -1) x = k;
if (a[k] == 1) y = k;
}
cout << x << ' ' << y << endl;
}
sugim48