提出 #62025419


ソースコード 拡げる

#include<bits/stdc++.h>
#define int long long
#define mod 1000000007
#define endl '\n'
#define pii pair<int,int>
#define Mikari_My_Wife ios::sync_with_stdio(0),cin.tie(0);
using namespace std;
void solve(){
    int n;
    cin>>n;
    int all[n];
    for(int i=0;i<n;i++)cin>>all[i];
    bool yes=1;
    for(int i=1;i<n-1;i++){
        if(all[i-1]*all[i+1]!=all[i]*all[i]){
            yes=0;
        }
    }
    if(yes)cout<<"Yes";
    else cout<<"No";
}
signed main(){
    //注意多筆測資輸入!!!
    Mikari_My_Wife
    int t=1;
    //cin>>t;
    while(t--){solve();}
}

提出情報

提出日時
問題 B - Geometric Sequence
ユーザ zihan_ayame
言語 C++ 20 (gcc 12.2)
得点 200
コード長 609 Byte
結果 AC
実行時間 1 ms
メモリ 3600 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 3
AC × 30
セット名 テストケース
Sample example_00.txt, example_01.txt, example_02.txt
All example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, hand_07.txt, hand_08.txt, hand_09.txt, hand_10.txt, hand_11.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt
ケース名 結果 実行時間 メモリ
example_00.txt AC 1 ms 3464 KiB
example_01.txt AC 1 ms 3440 KiB
example_02.txt AC 1 ms 3524 KiB
hand_00.txt AC 1 ms 3428 KiB
hand_01.txt AC 1 ms 3476 KiB
hand_02.txt AC 1 ms 3444 KiB
hand_03.txt AC 1 ms 3328 KiB
hand_04.txt AC 1 ms 3460 KiB
hand_05.txt AC 1 ms 3464 KiB
hand_06.txt AC 1 ms 3456 KiB
hand_07.txt AC 1 ms 3460 KiB
hand_08.txt AC 1 ms 3420 KiB
hand_09.txt AC 1 ms 3456 KiB
hand_10.txt AC 1 ms 3392 KiB
hand_11.txt AC 1 ms 3460 KiB
random_00.txt AC 1 ms 3464 KiB
random_01.txt AC 1 ms 3388 KiB
random_02.txt AC 1 ms 3388 KiB
random_03.txt AC 1 ms 3352 KiB
random_04.txt AC 1 ms 3528 KiB
random_05.txt AC 1 ms 3600 KiB
random_06.txt AC 1 ms 3600 KiB
random_07.txt AC 1 ms 3384 KiB
random_08.txt AC 1 ms 3392 KiB
random_09.txt AC 1 ms 3464 KiB
random_10.txt AC 1 ms 3388 KiB
random_11.txt AC 1 ms 3416 KiB
random_12.txt AC 1 ms 3404 KiB
random_13.txt AC 1 ms 3464 KiB
random_14.txt AC 1 ms 3460 KiB