結果
| 問題 |
No.313 π
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-08 23:05:56 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 18 ms / 5,000 ms |
| コード長 | 427 bytes |
| コンパイル時間 | 1,358 ms |
| コンパイル使用メモリ | 166,492 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-14 20:25:23 |
| 合計ジャッジ時間 | 3,001 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 32 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:20:22: warning: ‘e’ may be used uninitialized in this function [-Wmaybe-uninitialized]
20 | cout << e << " " << b << endl;
| ^~~
main.cpp:20:29: warning: ‘b’ may be used uninitialized in this function [-Wmaybe-uninitialized]
20 | cout << e << " " << b << endl;
| ^
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int>VI{ 20104, 20063, 19892, 20011, 19874, 20199, 19898, 20163, 19956, 19841 };
char c;
map<char, long long int>MCL;
while( cin >> c )MCL[c]++;
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 << e << " " << b << endl;
}