結果

問題 No.607 開通777年記念
ユーザー totori_nyaa
提出日時 2019-07-17 21:21:07
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 475 bytes
コンパイル時間 1,350 ms
コンパイル使用メモリ 167,340 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-23 08:45:54
合計ジャッジ時間 2,513 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 6 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

signed main(){
    ios::sync_with_stdio(false);
	cin.tie(0);
 
    int n,m;
    cin>>n>>m;
    int cnt[n]={};
    int sum=0;
    for(int i=0;i<m;i++){
        sum=0;
        for(int j=0;j<n;j++){
            int a;
            cin>>a;
            cnt[j]+=a;
            sum+=cnt[j];
        }
        if(sum==777){
            cout<<"YES"<<endl;
            return 0;
        }
    }
    cout<<"NO"<<endl;
}
0