結果
問題 | No.322 Geometry Dash |
ユーザー |
![]() |
提出日時 | 2016-01-04 03:53:19 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 67 ms / 2,000 ms |
コード長 | 499 bytes |
コンパイル時間 | 2,387 ms |
コンパイル使用メモリ | 160,220 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-08 18:44:58 |
合計ジャッジ時間 | 6,459 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i = 0; i < (int)(n); i++) #define FOR(i,n,m) for (int i=n; i<(int)(m); i++) #define INF 1000000007 int N; int T[100000],D[100000],v[100000]; bool compare(int x, int y){ return D[y]*T[x]>D[x]*T[y]; } int main(){ cin >> N; REP(i,N) cin >> T[i]; REP(i,N) cin >> D[i]; REP(i,N) v[i]=i; sort(v,v+N,compare); cout << v[0]+1; FOR(i,1,N) cout << " " << v[i]+1; cout << endl; return 0; }