Upload codes: contests

This commit is contained in:
2025-02-28 16:06:22 +00:00
parent 20088c4a66
commit b6243b7378
14 changed files with 574 additions and 0 deletions

View 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;
}