mirror of
https://github.com/wczffl-503/OI-Codes.git
synced 2025-07-07 18:06:58 +08:00
Upload codes: contests
This commit is contained in:
33
AtCoder/abc390/B_Geometric_Sequence.cpp
Normal file
33
AtCoder/abc390/B_Geometric_Sequence.cpp
Normal file
@ -0,0 +1,33 @@
|
||||
#include <bits/stdc++.h>
|
||||
#define lo long long
|
||||
#define INF INT_MAX
|
||||
#define LLM LONG_LONG_MAX
|
||||
|
||||
using namespace std;
|
||||
const lo N = 1e7 + 10;
|
||||
/*
|
||||
toothless. #17
|
||||
@fredcss_dev
|
||||
*/
|
||||
|
||||
lo n;
|
||||
lo a[N], b;
|
||||
bool flag = 0;
|
||||
|
||||
signed main()
|
||||
{
|
||||
cin >> n;
|
||||
for (int i = 1; i <= n; i++) {
|
||||
cin >> a[i];
|
||||
}
|
||||
for (int i = 3; i <= n; i++)
|
||||
{
|
||||
if (a[i] * a[1] != a[i - 1] * a[2])
|
||||
{
|
||||
puts("No");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
puts("Yes");
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user