답안 #779202

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
779202 2023-07-11T08:56:31 Z 1075508020060209tc NLO (COCI18_nlo) C++14
0 / 110
208 ms 65536 KB
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define X first
#define Y second
int n;int m;
int Q;
int gr[3010][3010];


signed main(){
cin>>n>>m;
cin>>Q;
for(int i=1;i<=n;i++){
    for(int j=1;j<=m;j++){
        gr[i][j]=1;
    }
}
while(Q--){
    int x;int y;int r;
    cin>>x>>y>>r;
    for(int i=1;i<=n;i++){
        for(int j=1;j<=m;j++){
            if( ((i-x)*(i-x)+(j-y)*(j-y))<=r*r ){
                gr[i][j]=0;
            }
        }
    }


    for(int i=1;i<=n;i++){
        for(int j=1;j<=m;j++){
           // cout<<gr[i][j]<<" ";
            gr[i][j]++;
        }//cout<<endl;
    }
    //cout<<endl;
}
int ans=0;
for(int i=1;i<=n;i++){
    for(int j=1;j<=n;j++){
        ans+=gr[i][j]-1;
    }
}
cout<<ans<<endl;

}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 120 ms 10708 KB Output isn't correct
2 Incorrect 147 ms 12124 KB Output isn't correct
3 Runtime error 103 ms 65536 KB Execution killed with signal 11
4 Runtime error 48 ms 65536 KB Execution killed with signal 9
5 Runtime error 100 ms 65536 KB Execution killed with signal 9
6 Runtime error 88 ms 65536 KB Execution killed with signal 9
7 Runtime error 145 ms 65536 KB Execution killed with signal 9
8 Runtime error 208 ms 65536 KB Execution killed with signal 9
9 Runtime error 156 ms 65536 KB Execution killed with signal 9
10 Runtime error 194 ms 65536 KB Execution killed with signal 9