Submission #30627793
Source Code Expand
#include<cstdio>
#include<algorithm>
using namespace std;
int main()
{
pair<unsigned, unsigned> a[3];
for (auto& i : a)scanf("%d%d", &i.first, &i.second);
sort(a, a + 3);
if (a[0].first == a[1].first && a[0].second == a[2].second)
{
printf("%d %d", a[2].first, a[1].second);
}
else if (a[0].first == a[1].first && a[1].second == a[2].second)
{
printf("%d %d", a[2].first, a[0].second);
}
else if (a[0].second == a[1].second && a[1].first == a[2].first)
{
printf("%d %d", a[0].first, a[2].second);
}
else
{
printf("%d %d", a[0].first, a[1].second);
}
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Four Points |
| User | LXl491214 |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 610 Byte |
| Status | AC |
| Exec Time | 5 ms |
| Memory | 1732 KiB |
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:7:24: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
7 | for (auto& i : a)scanf("%d%d", &i.first, &i.second);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, example0.txt, example1.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 5 ms | 1640 KiB |
| 001.txt | AC | 1 ms | 1684 KiB |
| 002.txt | AC | 1 ms | 1640 KiB |
| 003.txt | AC | 1 ms | 1676 KiB |
| 004.txt | AC | 1 ms | 1648 KiB |
| 005.txt | AC | 1 ms | 1732 KiB |
| 006.txt | AC | 1 ms | 1644 KiB |
| 007.txt | AC | 1 ms | 1676 KiB |
| 008.txt | AC | 1 ms | 1652 KiB |
| 009.txt | AC | 2 ms | 1708 KiB |
| 010.txt | AC | 1 ms | 1648 KiB |
| 011.txt | AC | 1 ms | 1704 KiB |
| 012.txt | AC | 2 ms | 1732 KiB |
| 013.txt | AC | 1 ms | 1652 KiB |
| 014.txt | AC | 1 ms | 1636 KiB |
| 015.txt | AC | 1 ms | 1680 KiB |
| example0.txt | AC | 1 ms | 1728 KiB |
| example1.txt | AC | 1 ms | 1656 KiB |