結果
| 問題 |
No.178 美しいWhitespace (1)
|
| コンテスト | |
| ユーザー |
ytft
|
| 提出日時 | 2021-03-18 14:56:29 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 467 bytes |
| コンパイル時間 | 1,729 ms |
| コンパイル使用メモリ | 165,900 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-16 16:44:29 |
| 合計ジャッジ時間 | 3,037 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 1 WA * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int N;
long initial;
long a,b;
long m=INT_MAX;
long s=0;
cin>>N;
for(int i=0;i<N;i++){
cin>>a>>b;
if(i==0){
initial=(a+b*4);
}
m=min(m,a+b*4);
s+=a+b*4;
if((a+b*4)%2!=initial%2){
cout<<(a+b*4)<<" "<<initial<<endl;
cout<<-1<<endl;
return 0;
}
}
cout<<(s-m*N)/2<<endl;
}
ytft