Submission #3598795
Source Code Expand
package main import( "fmt" ) type Interface interface { Len() int Less(i, j int) bool Swap(i, j int) } func main(){ var n int ans := 0 fmt.Scan(&n) var a []int for i:=0; i<n*3; i++ { var tmp int fmt.Scan(&tmp) a = append(a, tmp) } cnt := 0 for i:=3*n-2; i>=0; i-=2 { if cnt == n { break; } ans+=a[i] cnt++; } fmt.Println(ans) } //==== ↓↓↓ template functions ↓↓↓ ====================== func min(a, b int64) int64{ if a < b { return a } return b } func max(a, b int64) int64{ if a > b { return a } return b } func abs(x int64) int64{ if x < 0 { return -x } return x } func gcd(a, b int64) int64{ if b == 0 { return a }else{ return gcd(b, a%b) } } func lcm(a, b int64) int64{ return a*b/gcd(a, b); }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder Group Contest |
User | asdf1 |
Language | Go (1.6) |
Score | 0 |
Code Size | 899 Byte |
Status | WA |
Exec Time | 2104 ms |
Memory | 12800 KB |
Judge Result
Set Name | Sample | All | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_example_01.txt, 00_example_02.txt |
All | 00_example_01.txt, 00_example_02.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_example_01.txt | WA | 1 ms | 512 KB |
00_example_02.txt | AC | 1 ms | 512 KB |
01.txt | WA | 1 ms | 512 KB |
02.txt | WA | 2 ms | 512 KB |
03.txt | WA | 1 ms | 512 KB |
04.txt | WA | 1 ms | 512 KB |
05.txt | WA | 87 ms | 2432 KB |
06.txt | TLE | 2104 ms | 10112 KB |
07.txt | AC | 645 ms | 10880 KB |
08.txt | WA | 1363 ms | 9856 KB |
09.txt | WA | 1365 ms | 12800 KB |
10.txt | WA | 1374 ms | 8064 KB |