Submission #00062
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #include <bits/stdc++.h> #define endl "\n" #define INF INT_MAX using namespace std; int main(){ #define int long long cin.tie(nullptr);ios::sync_with_stdio( false ); int n; cin >>n; vector<pair< int , int >>a(n); for ( int i = 0;i < n;i++){ cin >>a[i].first; a[i].second = i+1; } for ( int i = 0;i < n;i++){ int x; cin >>x; a[i].first += x; } sort(a.begin(),a.end()); for ( int i = 0;i < n-1;i++){ cout <<a[i].second<< " " ; } cout <<a[n-1].second<<endl; } |
ステータス
項目 | データ |
---|---|
問題 | 0010 - 修学旅行と小森さん |
ユーザー名 | ei2332 |
投稿日時 | 2023-11-13 13:52:27 |
言語 | C++17 |
状態 | Accepted |
得点 | 100 |
ソースコード長 | 490 Byte |
最大実行時間 | 26 ms |
最大メモリ使用量 | 624 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 100 / 100 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in1.txt | AC | 22 ms | 472 KB |
1
|
in2.txt | AC | 15 ms | 380 KB |
1
|
in3.txt | AC | 20 ms | 464 KB |
1
|
in4.txt | AC | 26 ms | 420 KB |
1
|
in5.txt | AC | 23 ms | 500 KB |
1
|
in6.txt | AC | 22 ms | 456 KB |
1
|
in7.txt | AC | 20 ms | 540 KB |
1
|
in8.txt | AC | 22 ms | 624 KB |
1
|
in9.txt | AC | 15 ms | 580 KB |
1
|
in10.txt | AC | 20 ms | 428 KB |
1
|