結果

問題 No.759 悪くない忘年会にしような!
ユーザー ミドリムシミドリムシ
提出日時 2018-12-07 18:27:02
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 791 ms / 2,000 ms
コード長 792 bytes
コンパイル時間 489 ms
コンパイル使用メモリ 66,044 KB
実行使用メモリ 395,212 KB
最終ジャッジ日時 2023-10-12 03:59:38
合計ジャッジ時間 46,344 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 605 ms
394,612 KB
testcase_01 AC 595 ms
394,460 KB
testcase_02 AC 598 ms
394,516 KB
testcase_03 AC 595 ms
394,452 KB
testcase_04 AC 593 ms
394,552 KB
testcase_05 AC 596 ms
394,548 KB
testcase_06 AC 597 ms
394,452 KB
testcase_07 AC 600 ms
394,548 KB
testcase_08 AC 595 ms
394,548 KB
testcase_09 AC 594 ms
394,536 KB
testcase_10 AC 593 ms
394,612 KB
testcase_11 AC 594 ms
394,556 KB
testcase_12 AC 596 ms
394,564 KB
testcase_13 AC 595 ms
394,552 KB
testcase_14 AC 594 ms
394,508 KB
testcase_15 AC 594 ms
394,556 KB
testcase_16 AC 595 ms
394,536 KB
testcase_17 AC 595 ms
394,560 KB
testcase_18 AC 600 ms
394,796 KB
testcase_19 AC 600 ms
394,608 KB
testcase_20 AC 599 ms
394,556 KB
testcase_21 AC 596 ms
394,560 KB
testcase_22 AC 596 ms
394,552 KB
testcase_23 AC 598 ms
394,560 KB
testcase_24 AC 595 ms
394,500 KB
testcase_25 AC 596 ms
394,500 KB
testcase_26 AC 601 ms
394,456 KB
testcase_27 AC 600 ms
394,508 KB
testcase_28 AC 596 ms
394,452 KB
testcase_29 AC 602 ms
394,624 KB
testcase_30 AC 600 ms
394,548 KB
testcase_31 AC 597 ms
394,560 KB
testcase_32 AC 599 ms
394,548 KB
testcase_33 AC 609 ms
394,488 KB
testcase_34 AC 599 ms
394,552 KB
testcase_35 AC 598 ms
394,488 KB
testcase_36 AC 606 ms
394,460 KB
testcase_37 AC 600 ms
394,456 KB
testcase_38 AC 610 ms
394,660 KB
testcase_39 AC 599 ms
394,484 KB
testcase_40 AC 602 ms
394,476 KB
testcase_41 AC 603 ms
394,488 KB
testcase_42 AC 606 ms
394,496 KB
testcase_43 AC 608 ms
394,500 KB
testcase_44 AC 695 ms
394,988 KB
testcase_45 AC 698 ms
395,212 KB
testcase_46 AC 698 ms
395,028 KB
testcase_47 AC 693 ms
394,940 KB
testcase_48 AC 689 ms
395,200 KB
testcase_49 AC 675 ms
394,492 KB
testcase_50 AC 610 ms
394,552 KB
testcase_51 AC 608 ms
394,664 KB
testcase_52 AC 606 ms
394,460 KB
testcase_53 AC 696 ms
395,084 KB
testcase_54 AC 698 ms
395,024 KB
testcase_55 AC 695 ms
394,968 KB
testcase_56 AC 696 ms
394,948 KB
testcase_57 AC 695 ms
394,940 KB
testcase_58 AC 697 ms
394,968 KB
testcase_59 AC 697 ms
394,984 KB
testcase_60 AC 696 ms
395,084 KB
testcase_61 AC 698 ms
395,140 KB
testcase_62 AC 698 ms
395,012 KB
testcase_63 AC 791 ms
395,076 KB
testcase_64 AC 791 ms
394,992 KB
testcase_65 AC 660 ms
395,024 KB
testcase_66 AC 780 ms
395,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main(){
    int N;
    cin >> N;
    vector<vector<short>> space(10002, vector<short>(10002, -1));
    vector<vector<short>> space_max(10002, vector<short>(10002, -1));
    short P[N], T[N], R[N];
    for(int i = 0; i < N; i++){
        cin >> P[i] >> T[i] >> R[i];
        space[P[i]][T[i]] = max(space[P[i]][T[i]], R[i]);
    }
    for(int i = 10000; i >= 0; i--){
        for(int j = 10000; j >= 0; j--){
            space_max[i][j] = max({space_max[i + 1][j], space_max[i][j + 1], space[i][j]});
        }
    }
    for(int i = 0; i < N; i++){
        if(space[P[i]][T[i]] == R[i] && max(space_max[P[i] + 1][T[i]], space_max[P[i]][T[i] + 1]) < R[i]){
            cout << i + 1 << endl;
        }
    }
}
0