結果
| 問題 |
No.2655 Increasing Strides
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-01 21:24:59 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 488 bytes |
| コンパイル時間 | 624 ms |
| コンパイル使用メモリ | 70,412 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-09-29 13:27:47 |
| 合計ジャッジ時間 | 1,539 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 28 WA * 6 |
ソースコード
#include<iostream>
#include<vector>
#include<cassert>
using namespace std;
bool ok(vector<int>A)
{
long sum=0;
for(int a:A)sum+=a;
if(sum%2==1)return false;
sum/=2;
for(int i=A.size();i--;)
{
sum=abs(sum-A[i]);
}
return sum==0;
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;cin>>N;
vector<int>L,R;
for(int i=1;i<=N;i++)(i%2==1?L:R).push_back(i);
bool ans=true;
if(R.size()<=2)ans=false;
if(L.size()%2==1)ans=false;
cout<<(ans?"Yes":"No")<<endl;
}