제출 #138175

#제출 시각아이디문제언어결과실행 시간메모리
138175HassoonyAliens (IOI16_aliens)C++17
4 / 100
2 ms380 KiB
#include <bits/stdc++.h> #include "aliens.h" //#include "grader.cpp" using namespace std; typedef long long ll; const int MX=109; int v[MX]; bool vis[MX][MX]; void add(int x,int y){ for(int i=x;i<=y;i++)for(int j=x;j<=y;j++)vis[i][j]=1; } ll take_photos(int n, int m, int k, vector<int> r, vector<int> c) { for(int i=0;i<m;i++)v[i]=-1; for(int i=0;i<n;i++){ if(r[i] > c[i])swap(r[i],c[i]); int mn=min(r[i],c[i]); int mx=max(r[i],c[i]); add(mn,mx); } int ans=0; for(int i=0;i<m;i++)for(int j=0;j<m;j++)ans+=vis[i][j]; return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...