-
-
Save Hacv16/18a8528566e2de2d4ca9416aebc99bcf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int main() | |
{ | |
vector<int> v(6); | |
for(auto &x : v) cin >> x; | |
int soma = accumulate(v.begin(), v.end(), 0); | |
bool impasse = false; | |
for(int i = 0; i < 6; i++) | |
for(int j = i + 1; j < 6; j++) | |
for(int k = j + 1; k < 6; k++) | |
if(soma % 2 == 0 && (v[i] + v[j] + v[k]) == soma / 2) impasse = true; | |
cout << (impase ? 'S' : 'N') << '\n'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment