結果
問題 |
No.313 π
|
ユーザー |
|
提出日時 | 2023-02-26 12:02:13 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 430 bytes |
コンパイル時間 | 1,535 ms |
コンパイル使用メモリ | 167,964 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-14 03:56:59 |
合計ジャッジ時間 | 3,573 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 32 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:15:30: warning: 't' may be used uninitialized [-Wmaybe-uninitialized] 15 | cout << f << ' ' << t << '\n'; | ^~~~ main.cpp:10:12: note: 't' was declared here 10 | int f, t; | ^
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); vector<int> a = {20104,20063,19892,20011,19874,20199,19898,20163,19956,19841}; string s; cin >> s; int f, t; for(int i = 0; i < 10; i++){ if(count(s.begin(), s.end(), '0' + i) < a[i]) f = i; if(count(s.begin(), s.end(), '0' + i) > a[i]) t = i; } cout << f << ' ' << t << '\n'; }