結果

問題 No.610 区間賞(Section Award)
ユーザー pinpin
提出日時 2017-12-10 18:58:56
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 825 bytes
コンパイル時間 1,100 ms
コンパイル使用メモリ 84,896 KB
実行使用メモリ 13,624 KB
最終ジャッジ日時 2023-08-20 09:56:14
合計ジャッジ時間 7,168 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
12,880 KB
testcase_01 AC 3 ms
5,748 KB
testcase_02 AC 3 ms
5,764 KB
testcase_03 AC 4 ms
5,700 KB
testcase_04 AC 3 ms
5,704 KB
testcase_05 AC 3 ms
5,748 KB
testcase_06 AC 5 ms
5,736 KB
testcase_07 AC 4 ms
5,720 KB
testcase_08 AC 8 ms
5,748 KB
testcase_09 AC 4 ms
5,744 KB
testcase_10 AC 7 ms
5,676 KB
testcase_11 AC 7 ms
5,740 KB
testcase_12 AC 3 ms
5,716 KB
testcase_13 AC 7 ms
5,744 KB
testcase_14 AC 7 ms
5,740 KB
testcase_15 AC 6 ms
5,920 KB
testcase_16 AC 5 ms
5,848 KB
testcase_17 AC 4 ms
5,788 KB
testcase_18 AC 3 ms
5,640 KB
testcase_19 TLE -
testcase_20 TLE -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <iomanip>
#include <cstring>
#include <algorithm> 
#include <math.h>
#include <queue>
#include <functional>
#include <map>
#include <vector>
#include <string>
using namespace std;
typedef long long ll;

int n;
int s[100005];
int g[100005];
vector<int> v[100005],ans;
int main(void){
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> s[i];
        s[i]--;
        v[s[i]].push_back(i);
    }
    for (int i = 0; i < n; i++){
        cin >> g[i];
        g[i]--;
        v[g[i]].push_back(i);
    }

    for (int i = 0; i < n; i++){
        bool flag = true;
        for (int j = 0; j < n; j++){
            if (v[i][0]<v[j][0] && v[i][1]>v[j][1]) flag = false;
        }
        if (flag) ans.push_back(i);
    }

    for (int i = 0; i < ans.size(); i++) cout << ans[i] + 1 << endl;

}
0