# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
96387 | 2019-02-09T01:06:48 Z | DiegoGarcia | NLO (COCI18_nlo) | C++11 | 161 ms | 16304 KB |
#include <bits/stdc++.h> #define optimiza_io ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #define pb push_back #define ft first #define sd second #define ll long long #define ld long double #define ull unsigned long long #define INF 1E5 #define LINF 1E18 using namespace std; ll n,m,k,xi,yi,ri,ans=0; ll mat[1003][1003]; int main() { scanf("%lld %lld",&n,&m); scanf("%lld",&k); for( ll s=0; s<k; s++ ) { scanf("%lld %lld %lld",&xi,&yi,&ri); for( ll i=1; i<=n; i++ ) for( ll j=1; j<=n; j++ )mat[i][j]++; for( ll x=1; x<=n; x++ ) { for( ll y=1; y<=m; y++ ) { if( (xi-x)*(xi-x) + (yi-y)*(yi-y) <= ri*ri ) mat[x][y] = 0; } } } if( k == 0 ) ans = n*m; for( ll i=1; i<=n; i++ ) { for( ll j=1; j<=m; j++ ) { ans += mat[i][j]; } } printf("%lld",ans); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 122 ms | 7288 KB | Output isn't correct |
2 | Correct | 161 ms | 8184 KB | Output is correct |
3 | Runtime error | 23 ms | 16248 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
4 | Runtime error | 22 ms | 16248 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
5 | Runtime error | 24 ms | 16120 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
6 | Runtime error | 69 ms | 16304 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
7 | Runtime error | 49 ms | 16120 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
8 | Runtime error | 57 ms | 16120 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
9 | Runtime error | 73 ms | 16248 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
10 | Runtime error | 77 ms | 16168 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |