Submission #237075

#TimeUsernameProblemLanguageResultExecution timeMemory
237075Aldas25Cutting a rectangle (LMIO18_staciakampis)C++14
0 / 100
5 ms384 KiB
#include <bits/stdc++.h> using namespace std; #define FAST_IO ios_base::sync_with_stdio(0); cin.tie(nullptr) #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define REP(n) FOR(O, 1, (n)) #define pb push_back #define f first #define s second typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<pii> vii; const int MAXN = 300100; int n; vii seq; int main() { FAST_IO; cin >> n; REP(n) { int a, b; cin >> a >> b; seq.pb({a,b}); } bool ok = true; FOR(i, 1,n-1) if (seq[i].f != seq[0].f) ok = false; if (ok && n > 1 && seq[0].f > 1) { cout << "2\n1\n" << min(n, seq[0].f) << "\n"; } else cout << "1\n1\n"; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...