CSES - COCI 2007/2008 #1 - Results
Submission details
Task:Cetvrta
Sender:untokarila
Submission time:2019-07-29 13:50:59 +0300
Language:C++ (C++11)
Status:READY
Result:100
Feedback
groupverdictscore
#1ACCEPTED100
Test results
testverdicttime
#1ACCEPTED0.01 sdetails
#2ACCEPTED0.01 sdetails
#3ACCEPTED0.01 sdetails
#4ACCEPTED0.01 sdetails
#5ACCEPTED0.01 sdetails

Code

#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

int main(){

    vector<int> x, y;

    for(int i=0; i<3; i++){
        int a, b;
        cin >> a >> b;
        x.push_back(a);
        y.push_back(b);
    }

    sort(x.begin(), x.end());
    sort(y.begin(), y.end());

    if(x[0]!=x[1]) cout << x[0] << ' ';
    else cout << x[2] << ' ';

    if(y[0]!=y[1]) cout << y[0];
    else cout << y[2];

    return 0;
}

Test details

Test 1

Verdict: ACCEPTED

input
2 2
1 2
1 1

correct output
2 1

user output
2 1

Test 2

Verdict: ACCEPTED

input
7 9
7 3
4 9

correct output
4 3

user output
4 3

Test 3

Verdict: ACCEPTED

input
11 13
11 23
21 23

correct output
21 13

user output
21 13

Test 4

Verdict: ACCEPTED

input
300 100
100 100
100 300

correct output
300 300

user output
300 300

Test 5

Verdict: ACCEPTED

input
592 203
592 929
493 203

correct output
493 929

user output
493 929