Submission #8900801
Source Code Expand
using System; using System.Linq; namespace ARC081 { class C { static void Main(string[] args) { long N = long.Parse(Console.ReadLine()); long[] A = Console.ReadLine().Split().Select(long.Parse).OrderByDescending(x => x).ToArray(); long res = 1; int count = 0; for (int i = 0; i < N; i += 2) { if (i + 1 < N && A[i] == A[i + 1]) { res *= A[i]; count++; } if (count == 2) break; } if (count < 2) Console.WriteLine(0); else Console.WriteLine(res); } } }
Submission Info
Submission Time | |
---|---|
Task | C - Make a Rectangle |
User | chittai |
Language | C# (Mono 4.6.2.0) |
Score | 0 |
Code Size | 655 Byte |
Status | WA |
Exec Time | 119 ms |
Memory | 26080 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt, sample3.txt |
All | sample1.txt, sample2.txt, sample3.txt, 1.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, sample1.txt, sample2.txt, sample3.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
1.txt | AC | 118 ms | 26080 KB |
2.txt | AC | 66 ms | 16864 KB |
3.txt | WA | 117 ms | 24032 KB |
4.txt | AC | 119 ms | 24032 KB |
5.txt | AC | 66 ms | 14944 KB |
6.txt | AC | 112 ms | 24032 KB |
7.txt | AC | 111 ms | 21984 KB |
8.txt | AC | 59 ms | 14176 KB |
9.txt | AC | 69 ms | 18912 KB |
sample1.txt | AC | 25 ms | 11348 KB |
sample2.txt | AC | 25 ms | 11348 KB |
sample3.txt | AC | 25 ms | 11348 KB |