結果
問題 | No.322 Geometry Dash |
ユーザー |
![]() |
提出日時 | 2020-05-26 00:46:20 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 56 ms / 2,000 ms |
コード長 | 679 bytes |
コンパイル時間 | 1,556 ms |
コンパイル使用メモリ | 166,588 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-13 02:22:54 |
合計ジャッジ時間 | 7,162 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 |
ソースコード
/*** @FileName a.cpp* @Author kanpurin* @Created 2020.05.26 00:46:15**/#include "bits/stdc++.h"using namespace std;typedef long long ll;int main() {int n;cin >> n;vector<pair<pair<int,int>,int>> a(n);for (int i = 0; i < n; i++) {cin >> a[i].first.first;}for (int i = 0; i < n; i++) {cin >> a[i].first.second;a[i].second = i + 1;}sort(a.begin(), a.end(), [](pair<pair<int,int>,int> x, pair<pair<int,int>,int> y) {return x.first.first * y.first.second > x.first.second * y.first.first;});for (int i = 0; i < n; i++) {cout << a[i].second << " ";}cout << endl;return 0;}