Submission #279334

#TimeUsernameProblemLanguageResultExecution timeMemory
2793341723191831Aliens (IOI16_aliens)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; const int maxn=100005; const int maxm=1000005; int r[maxn],c[maxn]; int n,m,k; int tag[105][105]; long long int ans; int main(){ scanf("%d%d%d",&n,&m,&k); for(int i=0;i<n;i++) scanf("%d%d",&r[i],&c[i]); for(int i=0;i<k;i++) { for(int j=min(r[i],c[i]);max(r[i],c[i]);j++) for(int jj=min(r[i],c[i]);jj<=c[i];jj++) tag[j][jj]=1; } for(int i=0;i<m;i++) { for(int j=0;j<m;j++) if(tag[i][j])ans++; } cout<<ans; return 0; }

Compilation message (stderr)

aliens.cpp: In function 'int main()':
aliens.cpp:10:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   10 |  scanf("%d%d%d",&n,&m,&k);
      |  ~~~~~^~~~~~~~~~~~~~~~~~~
aliens.cpp:12:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   12 |   scanf("%d%d",&r[i],&c[i]);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~
/tmp/ccJtylrq.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccLI3HT6.o:aliens.cpp:(.text.startup+0x0): first defined here
/tmp/ccJtylrq.o: In function `main':
grader.cpp:(.text.startup+0xe1): undefined reference to `take_photos(int, int, int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status