Submission #180680
Source Code Expand
using System; using System.Collections.Generic; using System.Linq; using _ = System.Linq.Enumerable; class Program { public void solve() { Scanner cin = new Scanner(); int txa = cin.nextInt(); int tya = cin.nextInt(); int txb = cin.nextInt(); int tyb = cin.nextInt(); int T = cin.nextInt(); int V = cin.nextInt(); int n = cin.nextInt(); int[] x = new int[n]; int[] y = new int[n]; for (int i = 0; i < n; i++) { x[i] = cin.nextInt(); y[i] = cin.nextInt(); } bool flag = false; for (int i = 0; i < n; i++) { int go = (int)Math.Sqrt(Math.Pow(x[i] - txa, 2) + Math.Pow(y[i] - tya, 2)); int back = (int)Math.Sqrt(Math.Pow(x[i] - txb, 2) + Math.Pow(y[i] - tyb, 2)); if (go + back <= T * V) { flag = true; break; } } if (flag) PUTS("YES"); else PUTS("NO"); } #region static void PUTS() { Console.WriteLine(); } static void PUTS(object str) { Console.WriteLine(str); } public void SWAP<T>(ref T a, ref T b) { T tmp = a; a = b; b = tmp; } static void Main(string[] args) { new Program().solve(); #if DEBUG Console.ReadKey(); #endif } } class Scanner { string[] s; int i; char[] cs = new char[] { ' ' }; public Scanner() { s = new string[0]; i = 0; } public string next() { if (i < s.Length) return s[i++]; s = Console.ReadLine().Split(cs, StringSplitOptions.RemoveEmptyEntries); i = 0; return s[i++]; } public int nextInt() { return int.Parse(next()); } public long nextLong() { return long.Parse(next()); } public double nextDouble() { return double.Parse(next()); } } static class Extensions { public static void ForEach<T>(this T[] array, Action<T> action) { Array.ForEach<T>(array, obj => action(obj)); } public static void LESS<T>(this IEnumerable<T> str) { Console.WriteLine(string.Join(", ", str)); } public static void LESS<T>(this T[,] array2D) { for (int i = 0; i < array2D.GetLength(0); i++) { for (int j = 0; j < array2D.GetLength(1); j++) Console.Write("{0,-3} ", array2D[i, j]); Console.WriteLine(); } } } #endregion
Submission Info
Submission Time | |
---|---|
Task | C - 浮気調査 |
User | parfait |
Language | C# (Mono 2.10.8.1) |
Score | 0 |
Code Size | 2117 Byte |
Status | WA |
Exec Time | 141 ms |
Memory | 8336 KB |
Judge Result
Set Name | All | ||||
---|---|---|---|---|---|
Score / Max Score | 0 / 100 | ||||
Status |
|
Set Name | Test Cases |
---|---|
All | test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt, test_27.txt, test_28.txt, test_29.txt, test_30.txt, test_31.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 133 ms | 8084 KB |
sample_02.txt | AC | 141 ms | 8208 KB |
sample_03.txt | AC | 137 ms | 8208 KB |
sample_04.txt | AC | 129 ms | 8132 KB |
test_01.txt | AC | 136 ms | 8248 KB |
test_02.txt | AC | 135 ms | 8196 KB |
test_03.txt | WA | 135 ms | 8236 KB |
test_04.txt | AC | 133 ms | 8204 KB |
test_05.txt | AC | 133 ms | 8204 KB |
test_06.txt | AC | 133 ms | 8196 KB |
test_07.txt | AC | 135 ms | 8232 KB |
test_08.txt | AC | 134 ms | 8220 KB |
test_09.txt | AC | 134 ms | 8336 KB |
test_10.txt | AC | 132 ms | 8204 KB |
test_11.txt | AC | 133 ms | 8136 KB |
test_12.txt | AC | 139 ms | 8096 KB |
test_13.txt | WA | 132 ms | 8208 KB |
test_14.txt | AC | 133 ms | 8320 KB |
test_15.txt | AC | 131 ms | 8132 KB |
test_16.txt | AC | 133 ms | 8196 KB |
test_17.txt | AC | 133 ms | 8132 KB |
test_18.txt | AC | 132 ms | 8204 KB |
test_19.txt | WA | 136 ms | 8196 KB |
test_20.txt | AC | 134 ms | 8196 KB |
test_21.txt | WA | 133 ms | 8336 KB |
test_22.txt | AC | 133 ms | 8132 KB |
test_23.txt | AC | 131 ms | 8096 KB |
test_24.txt | AC | 130 ms | 8120 KB |
test_25.txt | AC | 132 ms | 8256 KB |
test_26.txt | AC | 134 ms | 8220 KB |
test_27.txt | AC | 134 ms | 8236 KB |
test_28.txt | AC | 134 ms | 8208 KB |
test_29.txt | AC | 138 ms | 8260 KB |
test_30.txt | AC | 131 ms | 8132 KB |
test_31.txt | AC | 132 ms | 8212 KB |