結果

問題 No.45 回転寿司
ユーザー kr1buki
提出日時 2017-01-31 17:03:53
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 423 bytes
コンパイル時間 697 ms
コンパイル使用メモリ 74,744 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-23 22:45:06
合計ジャッジ時間 1,840 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 4
other WA * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;

typedef struct Value{
int id, v;
}Value;

bool compare(const Value& left , const Value &right){
return left.v>right.v;
}

int main(){
int n;
scanf("%d",&n);
vector<Value> v(n);
for(int i=0;i<n;i++){
scanf("%d",&v[i].v);
v[i].id=i;
}
if(n==1){
printf("%d\n",v[0]);
return 0;
}
sort(v.begin(), v.end(), compare);

return 0;
}
0