結果
問題 | No.313 π |
ユーザー |
|
提出日時 | 2023-02-26 12:03:32 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 7 ms / 5,000 ms |
コード長 | 430 bytes |
コンパイル時間 | 1,611 ms |
コンパイル使用メモリ | 168,084 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-14 03:58:07 |
合計ジャッジ時間 | 2,998 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 32 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:15:18: warning: 't' may be used uninitialized [-Wmaybe-uninitialized] 15 | cout << t << ' ' << f << '\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 << t << ' ' << f << '\n';}