Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- #include <algorithm>
- #include <vector>
- #define task "parallel"
- using namespace std;
- using ld = long double;
- using ll = long long;
- const int N = 1e5 + 5;
- int a[15];
- vector<int> b;
- void Read(){
- for(int i = 1; i <= 12; ++i)
- a[i] = 0;
- for(int i = 1; i <= 12; ++i)
- cin >> a[i];
- b.reserve(12);
- }
- bool Check() {
- for(int i = 0; i < b.size(); i += 2)
- if(b[i] != b[i + 1]) return false;
- return true;
- }
- bool Solve(){
- sort(a + 1, a + 12 + 1);
- if(a[1] == a[12] && a[1] == 0) return 0;
- cout << ((a[1] == a[4] && a[5] == a[8] && a[9] == a[12]) ? "yes\n" : "no\n");
- return true;
- }
- int32_t main(){
- ios::sync_with_stdio(0);
- cin.tie(0);
- cout.tie(0);
- if(fopen(task".INP", "r")){
- freopen(task".INP", "r", stdin);
- freopen(task".OUT", "w", stdout);
- }
- while(1){
- Read();
- if(!Solve()) return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement