結果
| 問題 | No.607 開通777年記念 | 
| コンテスト | |
| ユーザー | 👑 | 
| 提出日時 | 2020-03-18 00:13:32 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 208 ms / 2,000 ms | 
| コード長 | 289 bytes | 
| コンパイル時間 | 486 ms | 
| コンパイル使用メモリ | 63,468 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-30 23:29:10 | 
| 合計ジャッジ時間 | 1,634 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 10 | 
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
            
            ソースコード
#include <iostream>
using namespace std;
int n,m,sm,pv,i,j,t,nw[1000];
main(){
	cin>>n>>m;
	for(i=0;m>i;i++){
		sm=0;pv=0;
		for(j=0;n>j;j++){
			cin>>t;
			sm+=nw[j]+=t;
			while(777<sm)sm-=nw[pv],pv++;
			if(777==sm){
				cout<<"YES"<<endl;
				return 0;
			}
		}
	}
	cout<<"NO"<<endl;
}
            
            
            
        