結果
| 問題 | No.610 区間賞(Section Award) |
| コンテスト | |
| ユーザー |
TANIGUCHI Kousuke
|
| 提出日時 | 2017-12-11 18:53:55 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 569 bytes |
| 記録 | |
| コンパイル時間 | 422 ms |
| コンパイル使用メモリ | 85,628 KB |
| 実行使用メモリ | 9,924 KB |
| 最終ジャッジ日時 | 2026-10-02 14:06:19 |
| 合計ジャッジ時間 | 4,745 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 47 RE * 3 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define REP(i,n) for(int i = 0; i < n; i++)
int main(void){
int n;
cin >> n;
vector<int> s(n),t(n),w(n),ans;
REP(i,n) cin >> s[i];
REP(i,n) cin >> t[i];
REP(i,n) w[s[i]] = i;
int j = -1;
REP(i,n) {
if(w[t[i]] > j){
ans.push_back(t[i]);
j = w[t[i]];
}
}
sort(ans.begin(), ans.end());
for(vector<int>::iterator it = ans.begin(); it != ans.end(); it++){
cout << *it <<endl;
}
}
TANIGUCHI Kousuke