結果
問題 |
No.1014 competitive fighting
|
ユーザー |
![]() |
提出日時 | 2020-02-20 08:31:33 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 725 bytes |
コンパイル時間 | 2,133 ms |
コンパイル使用メモリ | 173,988 KB |
実行使用メモリ | 6,144 KB |
最終ジャッジ日時 | 2024-12-14 16:05:50 |
合計ジャッジ時間 | 13,758 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 50 RE * 1 |
ソースコード
#include<bits/stdc++.h> #define REP(i,n) for(int i=0,i##_len=int(n);i<i##_len;++i) #define rep(i,a,b) for(int i=int(a);i<int(b);++i) #define All(x) (x).begin(),(x).end() #define rAll(x) (x).rbegin(),(x).rend() using namespace std; using ll = long long; int main(){ int N;cin>>N; assert(1<=N&&N<=100000); vector<ll> A(N),B(N),C(N); const int MAX=1e9; REP(i,N){ cin>>A[i]>>B[i]>>C[i]; assert(1<=A[i]&&A[i]<=MAX); assert(1<=B[i]&&B[i]<=MAX); assert(1<=C[i]&&C[i]<=MAX); } vector<int> ord(N); iota(All(ord),0); sort(All(ord),[&](int x,int y){if(A[y]<B[x]-C[x]) return true;if(A[x]<B[y]-C[y]) return false;return A[x]>A[y];}); REP(i,N) cout<<ord[i]<<endl; }