Clube dos Cinco
Problem LinkSolution by TioPatinhas — 100 pts
Code / Notes
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b, c, d, e, f, g;
cin >> n >> a >> b >> c >> d >> e >> f >> g;
n -= 3;
a--;
b--;
c--;
int soa, sob, soc;
soa = a - (d + e);
sob = b - (d + f);
soc = c - (e + f);
if (n != soa + sob + soc + d + e + f + g) {
cout << 'S' << endl;
exit(0);
}
cout << 'N' << endl;
}
Last updated 1 week, 3 days ago