Submission #96386

#TimeUsernameProblemLanguageResultExecution timeMemory
96386DiegoGarciaNLO (COCI18_nlo)C++14
11 / 110
156 ms16276 KiB
#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; ll mat[1003][1003]; int main() { scanf("%lld %lld",&n,&m); scanf("%lld",&k); //for( ll i=1; i<=n; i++ ) for( ll j=1; j<=n; j++ )mat[i][j]=1; 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 i=1; i<=n; i++ ) { for( ll j=1; j<=m; j++ ) { if( (xi-i)*(xi-i) + (yi-j)*(yi-j) <= ri*ri ) mat[i][j] = 0; } } } ll ans = 0; 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 (stderr)

nlo.cpp: In function 'int main()':
nlo.cpp:18:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%lld %lld",&n,&m);
     ~~~~~^~~~~~~~~~~~~~~~~~~
nlo.cpp:19:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%lld",&k);
     ~~~~~^~~~~~~~~~~
nlo.cpp:23:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%lld %lld %lld",&xi,&yi,&ri);
         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...