結果

問題 No.322 Geometry Dash
ユーザー しらっ亭しらっ亭
提出日時 2016-01-08 14:01:12
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 1,190 bytes
コンパイル時間 1,332 ms
コンパイル使用メモリ 163,036 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-26 06:00:10
合計ジャッジ時間 6,241 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 46 ms
5,376 KB
testcase_05 AC 47 ms
5,376 KB
testcase_06 AC 50 ms
5,376 KB
testcase_07 AC 53 ms
5,376 KB
testcase_08 AC 56 ms
5,376 KB
testcase_09 AC 46 ms
5,376 KB
testcase_10 AC 48 ms
5,376 KB
testcase_11 AC 51 ms
5,376 KB
testcase_12 AC 54 ms
5,376 KB
testcase_13 AC 57 ms
5,376 KB
testcase_14 AC 50 ms
5,376 KB
testcase_15 AC 51 ms
5,376 KB
testcase_16 AC 54 ms
5,376 KB
testcase_17 AC 59 ms
5,376 KB
testcase_18 AC 61 ms
5,376 KB
testcase_19 AC 53 ms
5,376 KB
testcase_20 AC 54 ms
5,376 KB
testcase_21 AC 58 ms
5,376 KB
testcase_22 AC 60 ms
5,376 KB
testcase_23 AC 62 ms
5,376 KB
testcase_24 AC 56 ms
5,376 KB
testcase_25 AC 56 ms
5,376 KB
testcase_26 AC 60 ms
5,376 KB
testcase_27 AC 63 ms
5,376 KB
testcase_28 AC 62 ms
5,376 KB
testcase_29 AC 60 ms
5,376 KB
testcase_30 AC 63 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(i,a,b) for (int i = (a); i < (b); i++)
#define RFOR(i,a,b) for (int i = (b)-1; i >= (a); i--)
#define REP(i,n) for (int i = 0; i < (n); i++)
#define RREP(i,n) for (int i = (n)-1; i >= 0; i--)
#define ALL(x) (x).begin(), (x).end()
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define RITR(x,c) for(__typeof(c.rbegin()) x=c.rbegin();x!=c.rend();x++)
template<class T> inline bool amax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool amin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
typedef long long ll;
// -------------------------------------

typedef pair<int, pair<int, int> > PIII;

int N;
PIII S[100010];

int cmp(PIII lhs, PIII rhs) {
  return rhs.second.first * lhs.second.second < lhs.second.first * rhs.second.second;
}

int main() {
  cin >> N;
  REP(i, N) {
    S[i].first = i + 1;
    cin >> S[i].second.first;
  }
  REP(i, N) cin >> S[i].second.second;

  sort(S, S+N, cmp);

  REP(i, N) {
    if (i > 0) cout << ' ';
    cout << S[i].first;
  }
  cout << '\n';

  return 0;
}
0