結果

問題 No.313 π
ユーザー merom686merom686
提出日時 2019-03-16 10:38:38
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 635 bytes
コンパイル時間 573 ms
コンパイル使用メモリ 73,336 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-14 15:07:00
合計ジャッジ時間 2,095 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 3 ms
4,376 KB
testcase_04 AC 3 ms
4,376 KB
testcase_05 AC 3 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 3 ms
4,380 KB
testcase_08 AC 3 ms
4,376 KB
testcase_09 AC 3 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 3 ms
4,376 KB
testcase_16 AC 2 ms
4,380 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 3 ms
4,376 KB
testcase_19 AC 2 ms
4,376 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 2 ms
4,380 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 AC 2 ms
4,380 KB
testcase_25 AC 2 ms
4,380 KB
testcase_26 AC 3 ms
4,376 KB
testcase_27 AC 2 ms
4,376 KB
testcase_28 AC 2 ms
4,380 KB
testcase_29 AC 2 ms
4,380 KB
testcase_30 AC 3 ms
4,380 KB
testcase_31 AC 2 ms
4,380 KB
testcase_32 AC 2 ms
4,380 KB
testcase_33 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: 関数 ‘int main()’ 内:
main.cpp:29:26: 警告: ‘i1’ may be used uninitialized [-Wmaybe-uninitialized]
   29 |     cout << i0 << ' ' << i1 << endl;
      |                          ^~
main.cpp:24:13: 備考: ‘i1’ はここで定義されています
   24 |     int i0, i1;
      |             ^~
main.cpp:29:19: 警告: ‘i0’ may be used uninitialized [-Wmaybe-uninitialized]
   29 |     cout << i0 << ' ' << i1 << endl;
      |                   ^~~
main.cpp:24:9: 備考: ‘i0’ はここで定義されています
   24 |     int i0, i1;
      |         ^~

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
using ll = long long;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    string s;
    cin >> s;

    int p[10] = { 20104, 20063, 19892, 20010, 19874, 20199, 19898, 20163, 19956, 19841, };
    p[3]++;
    p[s[0] - '0']--;
    for (int i = 0; i < 200000; i++) {
        p[s[i + 2] - '0']--;
    }
    int i0, i1;
    for (int i = 0; i < 10; i++) {
        if (p[i] < 0) i0 = i;
        if (p[i] > 0) i1 = i;
    }
    cout << i0 << ' ' << i1 << endl;

    return 0;
}
0