結果
| 問題 |
No.2655 Increasing Strides
|
| コンテスト | |
| ユーザー |
rotti_coder
|
| 提出日時 | 2024-03-01 21:23:39 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 441 bytes |
| コンパイル時間 | 2,019 ms |
| コンパイル使用メモリ | 196,852 KB |
| 最終ジャッジ日時 | 2025-02-19 22:14:45 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 WA * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n,a=0,b=0;
cin >> n;
vector<pair<int,int>>rotti;
rotti.push_back(make_pair(1,0));
rotti.push_back(make_pair(0,1));
rotti.push_back(make_pair(-1,0));
rotti.push_back(make_pair(0,-1));
for(int i=0;i<n;i++){
a+=rotti[i%4].first*(i+1);
b+=rotti[i%4].second*(i+1);
}
if(a==0 && b==0)cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
rotti_coder