結果
問題 | No.313 π |
ユーザー |
|
提出日時 | 2022-01-22 19:21:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 7 ms / 5,000 ms |
コード長 | 885 bytes |
コンパイル時間 | 3,968 ms |
コンパイル使用メモリ | 228,968 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-27 19:43:34 |
合計ジャッジ時間 | 5,264 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 32 |
ソースコード
#include <bits/stdc++.h>#include <atcoder/all>using namespace std;using namespace atcoder;using ll = long long;constexpr ll mod = 1e9 + 7;constexpr ll INF = 1LL << 60;#define REP(i, init, n) for(int i = (int)(init); i < (int)(n); i++)#define vi vector<int>#define vl vector<long>#define vvi vector<vector<int>>#define vvl vector<vector<long>>#define pint pair<int, int>#define plong pair<long, long>string s;void solve() {vi input(10, 0);for(char c: s) {if(c == '.') continue;input[c - '0']++;}vi correct = {20104, 20063, 19892, 20011, 19874, 20199, 19898, 20163, 19956, 19841};int ans1 = 0, ans2 = 0;REP(i, 0, 10) {if(input[i] == correct[i] + 1) ans1 = i;if(input[i] == correct[i] - 1) ans2 = i;}cout << ans1 << " " << ans2 << endl;return;}int main() {cin >> s;solve();}