結果
| 問題 |
No.607 開通777年記念
|
| コンテスト | |
| ユーザー |
Lepton_s
|
| 提出日時 | 2017-12-07 01:42:52 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 879 ms / 2,000 ms |
| コード長 | 1,411 bytes |
| コンパイル時間 | 797 ms |
| コンパイル使用メモリ | 93,192 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-29 01:47:15 |
| 合計ジャッジ時間 | 3,381 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <list>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> P;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;
#define rep(i,n) for(int (i)=0;(i)<(ll)(n);++(i))
#define repd(i,n,d) for(ll (i)=0;(i)<(ll)(n);(i)+=(d))
#define all(v) (v).begin(), (v).end()
#define pb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset((m),(v),sizeof(m))
#define chmin(X,Y) ((X)>(Y)?X=(Y),true:false)
#define chmax(X,Y) ((X)<(Y)?X=(Y),true:false)
#define fst first
#define snd second
#define UNIQUE(x) (x).erase(unique(all(x)),(x).end())
template<class T> ostream &operator<<(ostream &os, const vector<T> &v){int n=v.size();rep(i,n)os<<v[i]<<(i==n-1?"":" ");return os;}
#define N 1010
ll a[N], s[N];
int main(){
ll n, m;
cin>>n>>m;
bool ok = false;
rep(i, m){
rep(j, n){
int t;
cin>>t;
a[j] += t;
}
mset(s, 0);
rep(j, n) s[j+1] = s[j]+a[j];
rep(j, n+1) rep(k, n) if(s[j]-s[k]==777) ok = true;
}
cout<<(ok?"YES":"NO")<<endl;
return 0;
}
Lepton_s