結果
| 問題 |
No.202 1円玉投げ
|
| ユーザー |
red_rice_goma
|
| 提出日時 | 2018-08-02 06:10:05 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 439 bytes |
| コンパイル時間 | 1,706 ms |
| コンパイル使用メモリ | 166,192 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-22 11:30:27 |
| 合計ジャッジ時間 | 4,018 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 3 WA * 35 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
int a[100000] = {0};
int b[100000] = {0};
int cnt = 1;
int allx, ally;
cin >> n;
for(int i = 0; i < n; i++)
{
cin >> a[i] >> b[i];
}
allx = a[0];
ally = b[0];
for(int j = 1; j < n; j++)
{
if(abs(allx -a[j]) <= 10 || abs(ally -b[j]) <= 10)
{
continue;
}
else
{
allx = a[j];
ally = b[j];
cnt++;
}
}
printf("%d\n", cnt);
return 0;
}
red_rice_goma