結果
問題 | No.313 π |
ユーザー | koyumeishi |
提出日時 | 2015-12-06 02:38:17 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 6 ms / 5,000 ms |
コード長 | 604 bytes |
コンパイル時間 | 775 ms |
コンパイル使用メモリ | 74,700 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-14 15:03:44 |
合計ジャッジ時間 | 1,765 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 32 |
ソースコード
#include <iostream> #include <vector> #include <cstdio> #include <sstream> #include <map> #include <string> #include <algorithm> #include <queue> #include <cmath> #include <set> using namespace std; int main(){ string s; cin >> s; vector<long long> cnt(10, 0); for(int i=0; i<s.size(); i++){ if(i==1) continue; cnt[s[i]-'0']++; } int ans[] = {20104,20063,19892,20011,19874,20199,19898,20163,19956,19841}; int a = -1; int b = -1; for(int i=0; i<10; i++){ //cout << cnt[i] << endl; if(cnt[i] > ans[i]) a = i; if(cnt[i] < ans[i]) b = i; } printf("%d %d\n", a,b); return 0; }