# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
132883 | DanerZein | Aliens (IOI16_aliens) | C++14 | 3 ms | 376 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "aliens.h"
#include <bits/stdc++.h>
using namespace std;
int lan[110][110];
long long take_photos(int n, int m, int k, std::vector<int> r, std::vector<int> c) {
memset(lan,-1,sizeof lan);
for(int i=0;i<r.size();i++){
lan[r[i]][c[i]]=1;
}
long long d=0;
for(int i=0;i<r.size();i++){
int x,y;
x=min(r[i],c[i]);
y=max(r[i],c[i]);
for(int j=x;j<=y;j++){
for(int k=x;k<=y;k++){
lan[j][k]=2;
}
}
}
for(int i=0;i<m;i++){
for(int j=0;j<m;j++){
if(lan[i][j]==2){
d++;
}
}
}
//cout<<d<<endl;
return d;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |