結果
問題 |
No.607 開通777年記念
|
ユーザー |
![]() |
提出日時 | 2020-03-15 22:22:02 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 79 ms / 2,000 ms |
コード長 | 658 bytes |
コンパイル時間 | 3,043 ms |
コンパイル使用メモリ | 195,156 KB |
最終ジャッジ日時 | 2025-01-09 07:10:32 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include<bits/stdc++.h> using lint=long long; int main(){ std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false); std::cout.setf(std::ios_base::fixed);std::cout.precision(15); lint n,m;std::cin>>n>>m; std::vector<lint>a(n+1); for(lint i=1;i<=m;i++){ lint x=0; for(lint j=1;j<=n;j++){ lint y;std::cin>>y; x+=y; a.at(j)+=x; } for(lint j=0,k=0;j<n;j++){ for(;k<n&&a.at(k+1)-a.at(j)<=777;k++); if(a.at(k)-a.at(j)==777){ std::cout<<"YES"<<'\n'; return 0; } } } std::cout<<"NO"<<'\n'; }