| Task: | Point in Polygon |
| Sender: | aalto26jm_027 |
| Submission time: | 2026-11-09 17:17:59 +0200 |
| Language: | C++ (C++20) |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | WRONG ANSWER | 0.00 s | details |
| #2 | WRONG ANSWER | 0.01 s | details |
| #3 | WRONG ANSWER | 0.00 s | details |
| #4 | WRONG ANSWER | 0.00 s | details |
| #5 | WRONG ANSWER | 0.00 s | details |
| #6 | WRONG ANSWER | 0.00 s | details |
| #7 | WRONG ANSWER | 0.00 s | details |
| #8 | WRONG ANSWER | 0.00 s | details |
| #9 | WRONG ANSWER | 0.00 s | details |
| #10 | WRONG ANSWER | 0.00 s | details |
| #11 | WRONG ANSWER | 0.00 s | details |
| #12 | WRONG ANSWER | 0.00 s | details |
| #13 | WRONG ANSWER | 0.00 s | details |
| #14 | WRONG ANSWER | 0.00 s | details |
Code
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int, int>> coords(n+1);
for(int i = 0; i < n; i++){
int x, y;
cin >> x >> y;
coords[i] = {x, y};
}
coords[n] = coords[0];
long long area = 0;
for(int i = 0; i < n; i++){
area += 1ll * coords[i].first * coords[i+1].second - 1ll * coords[i].second * coords[i+1].first;
}
cout << abs(area) << endl;
}Test details
Test 1
Verdict: WRONG ANSWER
| input |
|---|
| 100 1000 -7 -19 91 77 100 100 64 60 ... |
| correct output |
|---|
| INSIDE OUTSIDE INSIDE INSIDE INSIDE ... |
| user output |
|---|
| 558 |
Feedback: Output is shorter than expected
Test 2
Verdict: WRONG ANSWER
| input |
|---|
| 1000 1000 365625896 -113418831 278762563 38777445 250367343 -96991975 175866909 -129766978 ... |
| correct output |
|---|
| OUTSIDE OUTSIDE INSIDE OUTSIDE OUTSIDE ... |
| user output |
|---|
| 2964980592166222056 |
Feedback: Output is shorter than expected
Test 3
Verdict: WRONG ANSWER
| input |
|---|
| 4 1 1 5 5 5 5 1 1 1 ... |
| correct output |
|---|
| INSIDE |
| user output |
|---|
| 0 |
Feedback: Incorrect character on line 1 col 1: expected "INSIDE", got "0"
Test 4
Verdict: WRONG ANSWER
| input |
|---|
| 4 1 1 5 5 5 5 1 1 1 ... |
| correct output |
|---|
| OUTSIDE |
| user output |
|---|
| 0 |
Feedback: Incorrect character on line 1 col 1: expected "OUTSIDE", got "0"
Test 5
Verdict: WRONG ANSWER
| input |
|---|
| 4 1 1 100 2 50 1 20 0 50 ... |
| correct output |
|---|
| INSIDE |
| user output |
|---|
| 98 |
Feedback: Incorrect character on line 1 col 1: expected "INSIDE", got "98"
Test 6
Verdict: WRONG ANSWER
| input |
|---|
| 8 1 0 0 0 2 1 1 2 2 ... |
| correct output |
|---|
| INSIDE |
| user output |
|---|
| 4 |
Feedback: Incorrect character on line 1 col 1: expected "INSIDE", got "4"
Test 7
Verdict: WRONG ANSWER
| input |
|---|
| 4 4 0 0 3 0 3 4 0 4 ... |
| correct output |
|---|
| INSIDE BOUNDARY OUTSIDE BOUNDARY |
| user output |
|---|
| 0 |
Feedback: Output is shorter than expected
Test 8
Verdict: WRONG ANSWER
| input |
|---|
| 6 1 0 0 0 2 3 1 2 2 ... |
| correct output |
|---|
| INSIDE |
| user output |
|---|
| 12 |
Feedback: Incorrect character on line 1 col 1: expected "INSIDE", got "12"
Test 9
Verdict: WRONG ANSWER
| input |
|---|
| 3 1 0 0 1 1000000000 -3 0 1 1 |
| correct output |
|---|
| OUTSIDE |
| user output |
|---|
| 999999996 |
Feedback: Incorrect character on line 1 col 1: expected "OUTSIDE", got "999999996"
Test 10
Verdict: WRONG ANSWER
| input |
|---|
| 3 1 -100000 0 -1000000000 -999999999 1000000000 1000000000 0 0 |
| correct output |
|---|
| OUTSIDE |
| user output |
|---|
| 999900001000100000 |
Feedback: Incorrect character on line 1 col 1: expected "OUTSIDE", got "999900001000..."
Test 11
Verdict: WRONG ANSWER
| input |
|---|
| 3 1 -100000 0 -999999999 -1000000000 1000 1000 0 0 |
| correct output |
|---|
| INSIDE |
| user output |
|---|
| 999900000000000999 |
Feedback: Incorrect character on line 1 col 1: expected "INSIDE", got "999900000000..."
Test 12
Verdict: WRONG ANSWER
| input |
|---|
| 4 1 -4 1 -6 1 -6 -1 -4 -1 ... |
| correct output |
|---|
| INSIDE |
| user output |
|---|
| 4 |
Feedback: Incorrect character on line 1 col 1: expected "INSIDE", got "4"
Test 13
Verdict: WRONG ANSWER
| input |
|---|
| 3 1 0 10 0 -10 10 0 1 0 |
| correct output |
|---|
| INSIDE |
| user output |
|---|
| 90 |
Feedback: Incorrect character on line 1 col 1: expected "INSIDE", got "90"
Test 14
Verdict: WRONG ANSWER
| input |
|---|
| 3 1000 -536621709 -536621709 955833081 955833081 -1 1 -439278425 -439278425 ... |
| correct output |
|---|
| BOUNDARY BOUNDARY BOUNDARY BOUNDARY BOUNDARY ... |
| user output |
|---|
| 1714499562379284962 |
Feedback: Output is shorter than expected
