Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- vector < int > solve(int a0, int a1, int a2, int b0, int b1, int b2)
- {
- int punkty[]={0,0};
- if(a0>b0)
- {
- punkty[0]++;
- }
- else if(a0<b0)
- {
- punkty[1]++;
- }
- if(a1>b1)
- {
- punkty[0]++;
- }
- else if(a1<b1)
- {
- punkty[1]++;
- }
- if(a2>b2)
- {
- punkty[0]++;
- }
- else if(a2<b2)
- {
- punkty[1]++;
- }
- vector <int> wynik(punkty, punkty + sizeof(punkty)/sizeof(int));
- return wynik;
- }
- int main() {
- int a0;
- int a1;
- int a2;
- cin >> a0 >> a1 >> a2;
- int b0;
- int b1;
- int b2;
- cin >> b0 >> b1 >> b2;
- vector < int > result = solve(a0, a1, a2, b0, b1, b2);
- for (ssize_t i = 0; i < result.size(); i++) {
- cout << result[i] << (i != result.size() - 1 ? " " : "");
- }
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement