結果
問題 |
No.313 π
|
ユーザー |
|
提出日時 | 2015-12-08 23:00:34 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 457 bytes |
コンパイル時間 | 1,575 ms |
コンパイル使用メモリ | 167,488 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-14 20:25:09 |
合計ジャッジ時間 | 2,892 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 32 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:23:29: warning: ‘e’ may be used uninitialized in this function [-Wmaybe-uninitialized] 23 | cout << b << " " << e << endl; | ^ main.cpp:23:22: warning: ‘b’ may be used uninitialized in this function [-Wmaybe-uninitialized] 23 | cout << b << " " << e << endl; | ^~~
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { vector<int>VI{ 20104, 20063, 19892, 20011, 19874, 20199, 19898, 20163, 19956, 19841 }; string S; getline( cin, S ); map<char, long long int>MCL; for( auto x : S ) { MCL[x]++; } int b, e; for( auto x : MCL ) { if( x.first != '.' ) { auto y = x.first - '0'; if( VI[y]<x.second ) { e = y; } else if( VI[y]>x.second ) { b = y; } } } cout << b << " " << e << endl; }