結果

問題 No.313 π
ユーザー merom686merom686
提出日時 2019-03-16 10:37:34
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 623 bytes
コンパイル時間 571 ms
コンパイル使用メモリ 72,808 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-14 15:06:58
合計ジャッジ時間 2,318 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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