Submission #796533

#TimeUsernameProblemLanguageResultExecution timeMemory
796533Minindu206Aliens (IOI16_aliens)C++14
4 / 100
1 ms340 KiB
#include "aliens.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; #define FOR(i, a, b) for (int i = a; i < (b); i++) #define F0R(i, a) for (int i = 0; i < (a); i++) #define FORd(i, a, b) for (int i = (b)-1; i >= a; i--) #define F0Rd(i, a) for (int i = (a)-1; i >= 0; i--) #define trav(a, x) for (auto &a : x) #define uid(a, b) uniform_int_distribution<int>(a, b)(rng) #define len(x) (int)(x).size() #define mp make_pair #define pb push_back #define fst first #define nl endl #define sec second #define lb lower_bound #define ub upper_bound #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define ins insert const int MOD = 1000000007; const int MX = INT_MAX; const int MN = INT_MIN; long long take_photos(int n, int m, int k, vector<int> r, vector<int> c) { vector<vi> arr(m, vi(m, 0)); F0R(i, n) { int rr = r[i], cc = c[i]; if (rr > cc) swap(rr, cc); FOR(j, rr, cc + 1) FOR(l, rr, cc + 1) arr[j][l] = 1; } ll ans = 0; F0R(i, m) F0R(j, m) ans += arr[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...