結果
問題 |
No.1208 anti primenumber game
|
ユーザー |
|
提出日時 | 2020-08-30 15:44:10 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 363 bytes |
コンパイル時間 | 1,754 ms |
コンパイル使用メモリ | 171,844 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-15 10:03:15 |
合計ジャッジ時間 | 5,145 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 31 WA * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ long long N,M;cin>>N>>M;vector<long long>A(N);for(int i=0;i<N;i++)cin>>A[i]; sort(A.begin(),A.end());reverse(A.begin(),A.end()); long long count=0,ans=0; for(int i=0;i<N;i++){ if(i%2==0)count+=A[i]-M; else ans+=A[i]-M; } cout<<(count>ans? "First":"Second")<<endl; }