結果
| 問題 | No.322 Geometry Dash |
| コンテスト | |
| ユーザー |
koyumeishi
|
| 提出日時 | 2015-12-15 18:55:17 |
| 言語 | C++11(old_compat) (gcc 12.4.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 75 ms / 2,000 ms |
| コード長 | 608 bytes |
| 記録 | |
| コンパイル時間 | 1,255 ms |
| コンパイル使用メモリ | 173,704 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-03-08 16:05:03 |
| 合計ジャッジ時間 | 7,446 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 27 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
template<class T> istream& operator >> (istream& is, vector<T>& vec){for(T& c: vec) is >> c;return is;}
template<class T> ostream& operator << (ostream& os, vector<T>& vec){for(int i=0; i<vec.size(); i++) os << vec[i] << (i==vec.size()-1?"\n":" ");return os;}
int main(){
int n; cin >> n;
vector<int> t(n),d(n); cin >> t >> d;
vector<int> ans(n); iota(ans.begin(), ans.end(), 0);
sort(ans.begin(), ans.end(), [&](const int& x, const int& y){return t[x]*d[y] > t[y]*d[x];});
for(int& v: ans) v++;
cout << ans;
return 0;
}
koyumeishi