結果
問題 |
No.313 π
|
ユーザー |
![]() |
提出日時 | 2019-03-16 10:37:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 623 bytes |
コンパイル時間 | 637 ms |
コンパイル使用メモリ | 73,832 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-01 22:22:34 |
合計ジャッジ時間 | 1,785 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | AC * 15 WA * 17 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:28:26: warning: 'i1' may be used uninitialized [-Wmaybe-uninitialized] 28 | cout << i0 << ' ' << i1 << endl; | ^~ main.cpp:23:13: note: 'i1' was declared here 23 | int i0, i1; | ^~ main.cpp:28:19: warning: 'i0' may be used uninitialized [-Wmaybe-uninitialized] 28 | cout << i0 << ' ' << i1 << endl; | ^~~ main.cpp:23:9: note: 'i0' was declared here 23 | int i0, i1; | ^~
ソースコード
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cstdio> #include <cstring> #include <cmath> using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); string s; cin >> s; int p[10] = { 20104, 20063, 19892, 20010, 19874, 20199, 19898, 20163, 19956, 19841, }; p[s[0] - '0']--; for (int i = 0; i < 200000; i++) { p[s[i + 2] - '0']--; } int i0, i1; for (int i = 0; i < 10; i++) { if (p[i] < 0) i0 = i; if (p[i] > 0) i1 = i; } cout << i0 << ' ' << i1 << endl; return 0; }