제출 #28744

#제출 시각아이디문제언어결과실행 시간메모리
28744repeatingAliens (IOI16_aliens)C++11
4 / 100
0 ms2032 KiB
#include <bits/stdc++.h>
#include "aliens.h"
#define F first
#define S second
#define P push
#define pb push_back
#define MEM(dp,i) memset(dp,i,sizeof(dp))
#define W while
#define R return
#define C continue
#define SI size()
#define ll long long
#define ld long double
#define pll pair<ll,ll>
#define pii pair<int,int>
#define SF(x) scanf("%I64d",&x)
#define SF2(x,y) scanf("%I64d%I64d",&x,&y)
#define SF3(x,y,z) scanf("%I64d%I64d%I64d",&x,&y,&z)
#define SF4(x,y,z,o) scanf("%I64d%I64d%I64d%I64d",&x,&y,&z,&o)
#define all(v) v.begin(),v.end()

using namespace std;
const long long INF = 1e8;
const int MX=200015;
int n,m,k;
bool b[111][111];
long long take_photos(int n_, int m_, int k_, vector<int> r, vector<int> c) {
    n=n_,m=m_,k=k_;
    for(int i=0;i<n;i++){
        int m1=min(r[i],c[i]);
        int m2=max(r[i],c[i]);
        for(int q=m1;q<=m2;q++){
            for(int j=m1;j<=m2;j++){
                b[q][j]=1;
            }
        }
    }
    int res=0;
    for(int i=0;i<m;i++){
        for(int j=0;j<m;j++)
            res+=b[i][j];
    }
    return res;
}
#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...