buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
using System; using System.Collections.Generic; using System.Linq; class PaizaSample { static void Main() { string[] abc = Console.ReadLine().Split(' '); int a = int.Parse(abc[0]); int b = int.Parse(abc[1]); int c = int.Parse(abc[2]); bool flag = true; int sum = 0; while (true) { ...
using System; using System.Collections.Generic; using System.Linq; class PaizaSample { static void Main() { string[] abc = Console.ReadLine().Split(' '); int a = int.Parse(abc[0]); int b = int.Parse(abc[1]); int c = int.Parse(abc[2]); bool flag = true; int sum = 0; while (true) { ...
[["-", 0, 57, 15, 16, 31, 16, 31, 16, 31, 203], ["+", 15, 16, 31, 16, 31, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 16, 31, 16, 31, 16, 12, 22], ["+", 15, 16, 31, 16, 31, 16, 31, 16, 12, 203], ["-", 8, 196, 0, 57, 15, 16, 12, 16, 17, 60], ["-", 8, 196, 0, 57, 15, 16, 12, 16, 12, 203], ["+", 0, 57, 15, 16, 31, 16, 12, 16, 1...
8
190
using System; using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Collections.Generic; using System.Diagnostics; // using System.Numerics; using Enu = System.Linq.Enumerable; public class Program { public void Solve() { int N = Reader.Int(), Q = Reader.Int();...
using System; using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Collections.Generic; using System.Diagnostics; // using System.Numerics; using Enu = System.Linq.Enumerable; public class Program { public void Solve() { int N = Reader.Int(), Q = Reader.Int();...
[["+", 0, 16, 31, 214, 205, 204, 206, 207, 0, 70], ["+", 205, 204, 206, 207, 0, 28, 0, 204, 205, 22], ["+", 206, 207, 0, 28, 0, 204, 206, 207, 0, 70], ["+", 0, 28, 0, 204, 206, 207, 0, 28, 0, 22], ["+", 206, 207, 0, 28, 0, 204, 206, 207, 0, 73], ["+", 0, 16, 31, 214, 205, 204, 206, 207, 0, 73]]
8
2,215
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; class TEST { static void Main() { Sol mySol = new Sol(); mySol.Solve(); } } class Sol { public void Solve() { long sum = 0; for (int i = 0; i < N; i++) { var d = rla(); su...
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; class TEST { static void Main() { Sol mySol = new Sol(); mySol.Solve(); } } class Sol { public void Solve() { long sum = 0; for (int i = 0; i < N; i++) { var d = rla(); su...
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
394
#pragma warning disable using System; using System.Collections.Generic; using System.Linq; using System.IO; // using Pair = System.Collections.Generic.KeyValuePair<int, int>; class Program { static void Main() { Console.SetOut( new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false }); ne...
#pragma warning disable using System; using System.Collections.Generic; using System.Linq; using System.IO; // using Pair = System.Collections.Generic.KeyValuePair<int, int>; class Program { static void Main() { Console.SetOut( new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false }); ne...
[["+", 31, 204, 206, 207, 0, 28, 0, 16, 17, 33], ["+", 31, 204, 206, 207, 0, 28, 0, 16, 12, 203], ["+", 12, 204, 206, 207, 0, 28, 0, 16, 17, 33], ["+", 12, 204, 206, 207, 0, 28, 0, 16, 12, 203]]
8
730
using System.Collections.Generic; using System.Linq; using System; public class Hello { public static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var n = int.Parse(line[0]); var L = int.Parse(line[1]); var a = new string[n]; for (int i = 0; i < n; i++) a[i] = Console...
using System.Collections.Generic; using System.Linq; using System; public class Hello { public static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var n = int.Parse(line[0]); var L = int.Parse(line[1]); var a = new string[n]; for (int i = 0; i < n; i++) a[i] = Console...
[["+", 0, 7, 8, 57, 64, 196, 0, 93, 0, 94], ["+", 0, 7, 8, 57, 64, 196, 0, 93, 0, 35]]
8
552
using System; class Example { static void Main() { int n = int.Parse(Console.ReadLine()); int a = 1, b = 1; int t; for (int i = 0; i < n - 1; i++) { t = b; a = a + b; b = t; } Console.WriteLine(a); } }
using System; class Example { static void Main() { int n = int.Parse(Console.ReadLine()); int a = 1, b = 1; int t; for (int i = 0; i < n - 1; i++) { t = a; a = a + b; b = t; } Console.WriteLine(a); } }
[["-", 0, 7, 8, 196, 0, 1, 0, 11, 12, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 12, 22]]
8
79
using System; namespace _10_A { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); if (n < 2) { Console.WriteLine(0); } else { int[] x = new int[n + 1]; x[0] = 1; x[1] = 1; for (int i = 2; i <= n; i++) { x[i] = x[i - 1] + x[i - 2...
using System; namespace _10_A { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); if (n < 2) { Console.WriteLine(1); } else { int[] x = new int[n + 1]; x[0] = 1; x[1] = 1; for (int i = 2; i <= n; i++) { x[i] = x[i - 1] + x[i - 2...
[["-", 0, 1, 0, 213, 3, 4, 0, 28, 0, 203], ["+", 0, 1, 0, 213, 3, 4, 0, 28, 0, 203]]
8
126
using System; using System.Collections.Generic; using System.Text; class Program { static Dictionary<int, int> dp = new Dictionary<int, int>() { { 1, 1 }, { 1, 1 } }; static void Main(string[] args) { string[] inputs = Console.ReadLine().Split(); System.Console.WriteLine(Fib(int.Parse(inputs[0]))); ...
using System; using System.Collections.Generic; using System.Text; class Program { static Dictionary<int, int> dp = new Dictionary<int, int>() { { 0, 1 }, { 1, 1 } }; static void Main(string[] args) { string[] inputs = Console.ReadLine().Split(); System.Console.WriteLine(Fib(int.Parse(inputs[0]))); ...
[["-", 0, 212, 0, 230, 10, 229, 0, 229, 0, 203], ["+", 0, 212, 0, 230, 10, 229, 0, 229, 0, 203]]
8
138
using System; class AOJ { public static void Main() { var input = Console.ReadLine().Trim().Split(' '); int a = int.Parse(input[0]); int b = int.Parse(input[1]); int large = Math.Max(a, b); int small = Math.Min(a, b); if (small == 0) { Console.WriteLine(small); return; } ...
using System; class AOJ { public static void Main() { var input = Console.ReadLine().Trim().Split(' '); int a = int.Parse(input[0]); int b = int.Parse(input[1]); int large = Math.Max(a, b); int small = Math.Min(a, b); if (small == 0) { Console.WriteLine(small); return; } ...
[["-", 0, 1, 0, 213, 3, 4, 0, 28, 0, 22], ["+", 0, 1, 0, 213, 3, 4, 0, 28, 0, 22]]
8
140
using System; class Gcd { public static void Main(string[] args) { string data = Console.ReadLine(); string[] xy = data.Split(); int x = int.Parse(xy[0]); int y = int.Parse(xy[1]); Console.WriteLine(gcd(x, y)); } public static int gcd(int a, int b) { if (a < b) { int temp = a; ...
using System; class Gcd { public static void Main(string[] args) { string data = Console.ReadLine(); string[] xy = data.Split(); int x = int.Parse(xy[0]); int y = int.Parse(xy[1]); Console.WriteLine(gcd(x, y)); } public static int gcd(int a, int b) { if (a < b) { int temp = a; ...
[["-", 8, 201, 0, 195, 8, 196, 0, 37, 0, 22], ["+", 8, 201, 0, 195, 8, 196, 0, 37, 0, 22]]
8
143
using System; class Program { static void Main() { string[] s = Console.ReadLine().Split(' '); int a = int.Parse(s[0]); int b = int.Parse(s[1]); int x = 0; if (a < b) { x = a; a = b; b = x; } while (b != 0) { x = b; b = a % x; } Console.WriteLine(x...
using System; class Program { static void Main() { string[] s = Console.ReadLine().Split(' '); int a = int.Parse(s[0]); int b = int.Parse(s[1]); int x = 0; if (a < b) { x = a; a = b; b = x; } while (b != 0) { x = b; b = a % x; a = x; } Consol...
[["+", 0, 52, 8, 196, 0, 1, 0, 11, 31, 22], ["+", 8, 196, 0, 1, 0, 11, 0, 202, 0, 32], ["+", 0, 52, 8, 196, 0, 1, 0, 11, 12, 22], ["+", 8, 196, 0, 52, 8, 196, 0, 1, 0, 35]]
8
108
using System; namespace Test { class MainClass { public static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var nums = new int[N]; for (int i = 0; i < nums.Length; i++) { nums[i] = int.Parse(Console.ReadLine()); } var result = 0; for (int i = 0; i < nums.Length; i+...
using System; namespace Test { class MainClass { public static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var nums = new int[N]; for (int i = 0; i < nums.Length; i++) { nums[i] = int.Parse(Console.ReadLine()); } var result = 0; for (int i = 0; i < nums.Length; i+...
[["-", 0, 57, 15, 16, 31, 23, 0, 16, 31, 22], ["+", 0, 57, 15, 16, 31, 23, 0, 16, 31, 22]]
8
208
using System; using System.Collections.Generic; using System.Linq; namespace AizuOnLine_Lesson { class Program { static void Main(string[] args) { List<int> data = Program.GetData(); int result = 0; foreach (int num in data) { double sqrtNum = Math.Sqrt((double)num); bool flag = true; ...
using System; using System.Collections.Generic; using System.Linq; namespace AizuOnLine_Lesson { class Program { static void Main(string[] args) { List<int> data = Program.GetData(); int result = 0; foreach (int num in data) { double sqrtNum = Math.Sqrt((double)num); bool flag = true; ...
[["-", 0, 210, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 210, 8, 196, 0, 7, 15, 16, 17, 19], ["-", 8, 196, 0, 1, 0, 11, 0, 202, 0, 32], ["+", 8, 196, 0, 1, 0, 11, 0, 202, 0, 107]]
8
199
using LIB; using System; using System.Linq; using System.Text; using System.Collections.Generic; class Program { public static IO IO = new IO(); static void Main(string[] args) { int n = IO.INT(); int[] m = IO.INT(n); int p = 0; for (int i = 0; i < n; i++) { if (m[i] == 2) { p++; ...
using LIB; using System; using System.Linq; using System.Text; using System.Collections.Generic; class Program { public static IO IO = new IO(); static void Main(string[] args) { int n = IO.INT(); int[] m = IO.INT(n); int p = 0; for (int i = 0; i < n; i++) { if (m[i] == 2) { p++; ...
[["-", 75, 57, 64, 196, 0, 7, 15, 16, 17, 18], ["+", 75, 57, 64, 196, 0, 7, 15, 16, 17, 19]]
8
975
using System; using System.Collections.Generic; class Program { static private List<int> PrimeList; static private int Max() { return PrimeList[PrimeList.Count - 1]; } static private bool Prime(int n) { if (n == 1) return false; int SqrtN = (int)Math.Sqrt(n) + 1; foreach (int p in PrimeList)...
using System; using System.Collections.Generic; class Program { static private List<int> PrimeList; static private int Max() { return PrimeList[PrimeList.Count - 1]; } static private bool Prime(int n) { if (n == 1) return false; int SqrtN = (int)Math.Sqrt(n); foreach (int p in PrimeList) { ...
[["-", 0, 198, 0, 200, 0, 212, 0, 16, 17, 72], ["-", 0, 198, 0, 200, 0, 212, 0, 16, 12, 203], ["-", 0, 57, 64, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 57, 64, 196, 0, 7, 15, 16, 17, 19]]
8
299
using System; namespace Sample { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int count = 0; int p; while (n-- > 0) { p = int.Parse(Console.ReadLine()); if (p == 2) { count++; continue; } for (int i = 2; i * i <= p; i...
using System; namespace Sample { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int count = 0; int p; LOOP: while (n-- > 0) { p = int.Parse(Console.ReadLine()); if (p == 2) { count++; continue; } for (int i = 2; i * i...
[["+", 8, 201, 0, 195, 8, 196, 0, 97, 0, 22], ["+", 8, 201, 0, 195, 8, 196, 0, 97, 0, 102], ["-", 0, 7, 8, 196, 0, 57, 64, 116, 0, 117], ["+", 0, 7, 8, 196, 0, 57, 64, 126, 0, 127], ["+", 0, 7, 8, 196, 0, 57, 64, 126, 0, 22]]
8
117
using System; using System.Linq; using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); int cnt = 0; for (int i = 0; i < n; i++) { int num = int.Parse(Console.ReadLine()); if (...
using System; using System.Linq; using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); int cnt = 0; for (int i = 0; i < n; i++) { int num = int.Parse(Console.ReadLine()); if (...
[["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203]]
8
172
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; namespace StartFinish { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int countNumber = 0; int[] array = new int[n]; for (int i = 0; i < n; i++) { a...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; namespace StartFinish { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int countNumber = 0; int[] array = new int[n]; for (int i = 0; i < n; i++) { a...
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
8
215
using System; namespace ALDS1_1_C_PrimeNumbers { class Program { static void Main(string[] args) { int dataCount = int.Parse(Console.ReadLine()); int count = 0; for (int lp = 0; lp < dataCount; lp++) { int inputNum = int.Parse(Console.ReadLine()); if (IsPrimeNumber(inputNum)) count+...
using System; namespace ALDS1_1_C_PrimeNumbers { class Program { static void Main(string[] args) { int dataCount = int.Parse(Console.ReadLine()); int count = 0; for (int lp = 0; lp < dataCount; lp++) { int inputNum = int.Parse(Console.ReadLine()); if (IsPrimeNumber(inputNum)) count+...
[["-", 0, 195, 8, 196, 0, 52, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 52, 15, 16, 17, 19]]
8
167
using System; // using System.Collections.Generic; // using System.Collections; // using System.Linq; namespace solution { class Class1 { static void Main() { int n = int.Parse(Console.ReadLine()); int count = 0; for (int i = 0; i < n; i++) { int x = int.Parse(Console.ReadLine()); if (Prime...
using System; // using System.Collections.Generic; // using System.Collections; // using System.Linq; namespace solution { class Class1 { static void Main() { int n = int.Parse(Console.ReadLine()); int count = 0; for (int i = 0; i < n; i++) { int x = int.Parse(Console.ReadLine()); if (Prime...
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
8
154
using System; class Maximum_Profit { public static void Main() { int n; n = int.Parse(Console.ReadLine()); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = int.Parse(Console.ReadLine()); } int max = a[1] - a[0]; int min = a[0]; for (int i = 1; i < n - 1; i++) { ...
using System; class Maximum_Profit { public static void Main() { int n; n = int.Parse(Console.ReadLine()); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = int.Parse(Console.ReadLine()); } int max = a[1] - a[0]; int min = a[0]; for (int i = 1; i <= n - 1; i++) { ...
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
8
150
using System; using System.IO; using System.Reflection; using System.Collections.Generic; using System.Text; namespace AOJ { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); var dic = new Dictionary<int, int>(); for (int i = 0; i < n; ++i) { dic.Add(i, int.P...
using System; using System.IO; using System.Reflection; using System.Collections.Generic; using System.Text; namespace AOJ { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); var dic = new Dictionary<int, int>(); for (int i = 0; i < n; ++i) { dic.Add(i, int.P...
[["+", 31, 204, 206, 207, 0, 28, 0, 16, 17, 72], ["+", 31, 204, 206, 207, 0, 28, 0, 16, 12, 203]]
8
187
using System; class AOJ { static void Main() { int R, n; int min_R = (int)2e5, ans = (int)1e9; n = int.Parse(Console.ReadLine()); for (int i = 0; i < n; i++) { R = int.Parse(Console.ReadLine()); if (i == 0) min_R = R; else { ans = Math.Max(ans, R - min_R); ...
using System; class AOJ { static void Main() { int R, n; int min_R = (int)2e5, ans = (int)-1e9; n = int.Parse(Console.ReadLine()); for (int i = 0; i < n; i++) { R = int.Parse(Console.ReadLine()); if (i == 0) min_R = R; else { ans = Math.Max(ans, R - min_R); ...
[["+", 0, 200, 0, 212, 0, 74, 51, 241, 0, 33]]
8
120
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace _20170409_AOJ { class ALDS1_1D { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int min; int maxD = -1; min = int.Parse(Console.ReadLine()); for (int i = 1; i < n; i++) { ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace _20170409_AOJ { class ALDS1_1D { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int min; int maxD = int.MinValue; min = int.Parse(Console.ReadLine()); for (int i = 1; i < n; ...
[["-", 0, 198, 0, 200, 0, 212, 0, 241, 0, 33], ["-", 0, 198, 0, 200, 0, 212, 0, 241, 0, 203], ["+", 0, 198, 0, 200, 0, 212, 0, 214, 205, 199], ["+", 0, 198, 0, 200, 0, 212, 0, 214, 0, 131], ["+", 0, 198, 0, 200, 0, 212, 0, 214, 141, 22]]
8
142
using System; using System.Collections.Generic; using System.Linq; namespace Practice { class Program { static void Main(string[] args) { SolveA(args); // SolveB(args); // SolveC(args); // SolveD(args); } static void SolveA(string[] args) { string sz = (Console.ReadLine()); int n = int....
using System; using System.Collections.Generic; using System.Linq; namespace Practice { class Program { static void Main(string[] args) { SolveA(args); // SolveB(args); // SolveC(args); // SolveD(args); } static void SolveA(string[] args) { string sz = (Console.ReadLine()); int n = int....
[["-", 8, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 196, 0, 7, 15, 16, 12, 16, 12, 203]]
8
187
using System; public class Bubble { public static void Main(string[] args) { int count = int.Parse(Console.ReadLine()); string data = Console.ReadLine(); string[] num = data.Split(); int[] target = new int[count]; int temp; int sortCount = 0; //?????????????????°??? for (int d = 0; d < n...
using System; public class Bubble { public static void Main(string[] args) { int count = int.Parse(Console.ReadLine()); string data = Console.ReadLine(); string[] num = data.Split(); int[] target = new int[count]; int temp; int sortCount = 0; //?????????????????°??? for (int d = 0; d < n...
[["-", 8, 196, 0, 7, 15, 16, 12, 16, 12, 203], ["+", 8, 196, 0, 7, 15, 16, 12, 16, 12, 203]]
8
249
using System; class main { public static void Main(String[] args) { int n = int.Parse(Console.ReadLine()); int[] ary = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse); int cnt = bubbleSort(ary, n); for (int i = 0; i < ary.Length; i++) { if (i != ary.Length - 1) { Console.Wr...
using System; class main { public static void Main(String[] args) { int n = int.Parse(Console.ReadLine()); int[] ary = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse); int cnt = bubbleSort(ary, n); for (int i = 0; i < ary.Length; i++) { if (i != ary.Length - 1) { Console.Wr...
[["+", 0, 213, 3, 4, 0, 28, 0, 16, 17, 72], ["+", 3, 4, 0, 28, 0, 16, 12, 5, 0, 62], ["+", 3, 4, 0, 28, 0, 16, 12, 5, 0, 222]]
8
238
using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.IO; using System.Linq; class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); //標準入力 int[] array = Console.ReadLine().Split().Select(int.Parse).ToArray(); int count ...
using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.IO; using System.Linq; class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); //標準入力 int[] array = Console.ReadLine().Split().Select(int.Parse).ToArray(); int count ...
[["-", 0, 7, 8, 196, 0, 57, 15, 16, 17, 20], ["+", 0, 7, 8, 196, 0, 57, 15, 16, 17, 47]]
8
211
using System; class A { public static void Main() { int n, count = 0; n = int.Parse(Console.ReadLine()); int[] array = new int[n]; string[] str = Console.ReadLine().Split(' '); for (int i = 0; i < n; i++) { array[i] = int.Parse(str[i]); } for (int i = 0; i < n - 1; i++) { fo...
using System; class A { public static void Main() { int n, count = 0; n = int.Parse(Console.ReadLine()); int[] array = new int[n]; string[] str = Console.ReadLine().Split(' '); for (int i = 0; i < n; i++) { array[i] = int.Parse(str[i]); } for (int i = 0; i < n - 1; i++) { fo...
[["+", 0, 204, 206, 207, 0, 28, 0, 16, 17, 33], ["+", 0, 204, 206, 207, 0, 28, 0, 16, 12, 203]]
8
258
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace lec11A { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] array = new int[n]; for (int i = 0; i < n; i++) { Clean(array, n); ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace lec11A { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] array = new int[n]; for (int i = 0; i < n; i++) { Clean(array, n); ...
[["+", 0, 213, 3, 4, 0, 28, 0, 204, 205, 22], ["+", 3, 4, 0, 28, 0, 204, 206, 207, 0, 70], ["+", 3, 4, 0, 28, 0, 204, 206, 207, 0, 73]]
8
258
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Competitive { internal class Node { public List<Edge> Edges; public int Dist; public int No; public bool Visited; public int Start; public int End; public Node(int no) { this.No = no; Dist = int.MaxVal...
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Competitive { internal class Node { public List<Edge> Edges; public int Dist; public int No; public bool Visited; public int Start; public int End; public Node(int no) { this.No = no; Dist = int.MaxVal...
[["+", 0, 213, 3, 4, 0, 28, 0, 16, 17, 72], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 12, 203]]
8
635
using System; using System.Collections.Generic; public class Program { const int MAX = 100; const int INFINITY = (1 << 21); const int WHITE = 0; const int GRAY = 1; const int BLACK = 2; static int[,] M; public static void Main() { // ??°??????????????? int n = int.Parse(Console.ReadLine()); ...
using System; using System.Collections.Generic; public class Program { const int MAX = 100; const int INFINITY = (1 << 21); const int WHITE = 0; const int GRAY = 1; const int BLACK = 2; static int[,] M; public static void Main() { // ??°??????????????? int n = int.Parse(Console.ReadLine()); ...
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
551
using System; using System.Collections.Generic; namespace alds_12 { public class Program { public class pair<T, U> : IComparable where T : IComparable<T> { public pair() {} public pair(T first, U second) { this.First = first; this.Second = second; } public int CompareTo(Object obj...
using System; using System.Collections.Generic; namespace alds_12 { public class Program { public class pair<T, U> : IComparable where T : IComparable<T> { public pair() {} public pair(T first, U second) { this.First = first; this.Second = second; } public int CompareTo(Object obj...
[["-", 8, 201, 0, 263, 54, 55, 0, 220, 39, 199], ["-", 8, 201, 0, 263, 54, 55, 0, 220, 141, 22], ["-", 0, 11, 12, 227, 39, 224, 225, 226, 0, 22], ["+", 0, 11, 12, 227, 39, 224, 225, 226, 0, 203], ["-", 0, 11, 12, 230, 3, 4, 0, 28, 0, 22]]
8
1,215
using System; public class hello { public static void Main() { var s1 = Console.ReadLine().Trim(); var s2 = Console.ReadLine().Trim(); var findex = s1.IndexOf(s2); if (findex > 0) Console.WriteLine(findex); while (0 <= findex) { var nIndex = findex + 1; if (nIndex < s1.Length) {...
using System; public class hello { public static void Main() { var s1 = Console.ReadLine().Trim(); var s2 = Console.ReadLine().Trim(); var findex = s1.IndexOf(s2); if (findex >= 0) Console.WriteLine(findex); while (0 <= findex) { var nIndex = findex + 1; if (nIndex < s1.Length) ...
[["-", 0, 195, 8, 196, 0, 57, 15, 16, 17, 47], ["+", 0, 195, 8, 196, 0, 57, 15, 16, 17, 20]]
8
117
using System; using System.Linq; using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); string[] inputs = Console.ReadLine().Split(' '); int[] A = new int[n]; for (int i = 0; i < n; i+...
using System; using System.Linq; using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); string[] inputs = Console.ReadLine().Split(' '); int[] A = new int[n]; for (int i = 0; i < n; i+...
[["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203]]
8
239
using System.Collections.Generic; using System.Linq; public class PictureMatching { private static int[] item; public static void Main(string[] args) { Input(); Method(); } private static void Input() { System.Console.ReadLine(); item = ToIntArray(System.Console.ReadLine().Split(' ')); } ...
using System.Collections.Generic; using System.Linq; public class PictureMatching { private static int[] item; public static void Main(string[] args) { Input(); Method(); } private static void Input() { System.Console.ReadLine(); item = ToIntArray(System.Console.ReadLine().Split(' ')); } ...
[["+", 0, 195, 8, 196, 0, 1, 0, 213, 63, 22], ["+", 8, 196, 0, 1, 0, 213, 3, 4, 0, 24], ["+", 0, 1, 0, 213, 3, 4, 0, 28, 0, 22], ["+", 8, 196, 0, 1, 0, 213, 3, 4, 0, 25], ["+", 8, 201, 0, 195, 8, 196, 0, 1, 0, 35]]
8
290
// Getting Started - Insertion Sort // http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_1_A using System; using System.Linq; namespace ALDS1_1_A { class Program { public Program() {} public static void Main() { new Program().Calc(); } void Calc() { var N = int.Parse(Input); // Number of eleme...
// Getting Started - Insertion Sort // http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_1_A using System; using System.Linq; namespace ALDS1_1_A { class Program { public Program() {} public static void Main() { new Program().Calc(); } void Calc() { var N = int.Parse(Input); // Number of eleme...
[["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203]]
8
216
using System; class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); string[] input = Console.ReadLine().Split(' '); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = int.Parse(input[i]); } InsertionSort(a); } static void InsertionSort(...
using System; class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); string[] input = Console.ReadLine().Split(' '); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = int.Parse(input[i]); } InsertionSort(a); } static void InsertionSort(...
[["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203]]
8
227
using System; class InsertionSort { public static void Main() { int n = int.Parse(Console.ReadLine().Trim()); var input = Console.ReadLine().Trim().Split(' '); var A = new int[n]; for (int i = 0; i < n; i++) { A[i] = int.Parse(input[i]); } Sort(A, n); } static void Sort(int[] A, in...
using System; class InsertionSort { public static void Main() { int n = int.Parse(Console.ReadLine().Trim()); var input = Console.ReadLine().Trim().Split(' '); var A = new int[n]; for (int i = 0; i < n; i++) { A[i] = int.Parse(input[i]); } Sort(A, n); } static void Sort(int[] A, in...
[["+", 0, 195, 8, 196, 0, 1, 0, 213, 63, 22], ["+", 8, 196, 0, 1, 0, 213, 3, 4, 0, 24], ["+", 0, 1, 0, 213, 3, 4, 0, 28, 0, 22], ["+", 8, 196, 0, 1, 0, 213, 3, 4, 0, 25], ["+", 8, 201, 0, 195, 8, 196, 0, 1, 0, 35]]
8
246
using System; using System.Linq; namespace Sample101 { struct Card { public char suit; public char value; } class Program { static void BubbleSort(Card[] C) { for (int i = 0; i < C.Length; i++) { for (int j = C.Length - 1; j >= i + 1; j--) { if (C[j].value < C[j - 1].value) { var tem...
using System; using System.Linq; namespace Sample101 { struct Card { public char suit; public char value; } class Program { static void BubbleSort(Card[] C) { for (int i = 0; i < C.Length; i++) { for (int j = C.Length - 1; j >= i + 1; j--) { if (C[j].value < C[j - 1].value) { var tem...
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
572
using System; using System.Linq; using System.Collections; using System.Collections.Generic; class Program { static void Swap(string[] A, int from, int to) { string temp = A[from]; A[from] = A[to]; A[to] = temp; } static void BubbleSort(string[] ary) { bool swapped = true; while (swapped) { ...
using System; using System.Linq; using System.Collections; using System.Collections.Generic; class Program { static void Swap(string[] A, int from, int to) { string temp = A[from]; A[from] = A[to]; A[to] = temp; } static void BubbleSort(string[] ary) { bool swapped = true; while (swapped) { ...
[["-", 3, 4, 0, 28, 0, 41, 75, 5, 0, 222], ["+", 3, 4, 0, 28, 0, 41, 75, 5, 0, 222]]
8
530
using System; using System.Linq; using System.Collections.Generic; public class Hoge { public static void Main() { var n = int.Parse(System.Console.ReadLine()); if (n == 0) { } var cardsLine = System.Console.ReadLine().Split(' '); var bubbleSortedList = BubbleSort((string[])cardsLine.Clone()); ...
using System; using System.Linq; using System.Collections.Generic; public class Hoge { public static void Main() { var n = int.Parse(System.Console.ReadLine()); if (n == 0) { } var cardsLine = System.Console.ReadLine().Split(' '); var bubbleSortedList = BubbleSort((string[])cardsLine.Clone()); ...
[["-", 0, 11, 12, 213, 3, 4, 0, 28, 0, 22], ["+", 3, 4, 0, 28, 0, 213, 63, 214, 205, 22], ["+", 3, 4, 0, 28, 0, 213, 63, 214, 0, 131], ["+", 3, 4, 0, 28, 0, 213, 63, 214, 141, 22], ["+", 3, 4, 0, 28, 0, 213, 3, 4, 0, 24], ["+", 3, 4, 0, 28, 0, 213, 3, 4, 0, 25]]
8
540
using System; namespace AOJ.ALDS { public class StableSort { private struct Card { public string Suit { get; set; } public int Number { get; set; } } private static void BubbleSort(Card[] array, int N) { for (int i = 0; i < N; i++) { bool end = true; for (int j = N - 1;...
using System; namespace AOJ.ALDS { public class StableSort { private struct Card { public string Suit { get; set; } public int Number { get; set; } } private static void BubbleSort(Card[] array, int N) { for (int i = 0; i < N; i++) { bool end = true; for (int j = N - 1;...
[["-", 0, 7, 8, 196, 0, 7, 26, 223, 0, 29], ["+", 0, 7, 8, 196, 0, 7, 26, 223, 0, 68]]
8
573
using System; // using System.Collections.Generic; namespace Project { class MainClass { public static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); string[] card1 = Console.ReadLine().Split(' '); string[] card2 = new string[N]; for (int i = 0; i < N; i++) { card2[i] = card1...
using System; // using System.Collections.Generic; namespace Project { class MainClass { public static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); string[] card1 = Console.ReadLine().Split(' '); string[] card2 = new string[N]; for (int i = 0; i < N; i++) { card2[i] = card1...
[["+", 10, 198, 0, 200, 0, 212, 0, 16, 17, 72], ["+", 10, 198, 0, 200, 0, 212, 0, 16, 12, 203]]
8
507
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace _20170409_AOJ { class ALDS1_2C { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); string[] sArr = Console.ReadLine().Split(' '); string[] arr1 = new string[n]; sArr.CopyTo(arr1, 0);...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace _20170409_AOJ { class ALDS1_2C { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); string[] sArr = Console.ReadLine().Split(' '); string[] arr1 = new string[n]; sArr.CopyTo(arr1, 0);...
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
621
using System; class C { public static void Main() { int n = int.Parse(Console.ReadLine()); string[] bublearray = new string[n]; string[] selectarray = new string[n]; string[] str = Console.ReadLine().Split(' '); string[] str2 = new string[n]; for (int i = 0; i < n; i++) { str2[i] = str...
using System; class C { public static void Main() { int n = int.Parse(Console.ReadLine()); string[] bublearray = new string[n]; string[] selectarray = new string[n]; string[] str = Console.ReadLine().Split(' '); string[] str2 = new string[n]; for (int i = 0; i < n; i++) { str2[i] = str...
[["+", 0, 204, 206, 207, 0, 28, 0, 16, 17, 33], ["+", 0, 204, 206, 207, 0, 28, 0, 16, 12, 203]]
8
665
using LIB; using System; using System.Linq; using System.Text; using System.Collections.Generic; class Program { public static IO IO = new IO(); static void Main(string[] args) { int n = IO.INT(); int[] m = IO.INT(n); List<int> g = new List<int>(); int c = 0; g.Add(1); for (int i = 0; 3 * g...
using LIB; using System; using System.Linq; using System.Text; using System.Collections.Generic; class Program { public static IO IO = new IO(); static void Main(string[] args) { int n = IO.INT(); int[] m = IO.INT(n); List<int> g = new List<int>(); int c = 0; g.Add(1); for (int i = 0; 3 * g...
[["-", 8, 196, 0, 7, 15, 16, 31, 16, 17, 33], ["+", 8, 196, 0, 7, 15, 16, 31, 16, 17, 72]]
8
1,092
using System; using System.Collections.Generic; class Program { public static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] array = new int[n]; for (int k = 0; k < n; k++) { array[k] = int.Parse(Console.ReadLine()); } int cnt = 0; int m = 1; //?????£????????????...
using System; using System.Collections.Generic; class Program { public static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] array = new int[n]; for (int k = 0; k < n; k++) { array[k] = int.Parse(Console.ReadLine()); } int cnt = 0; int m = 1; //?????£????????????...
[["-", 0, 1, 0, 11, 31, 204, 206, 207, 0, 70], ["-", 0, 11, 31, 204, 206, 207, 0, 28, 0, 22], ["-", 0, 1, 0, 11, 31, 204, 206, 207, 0, 73], ["-", 8, 196, 0, 1, 0, 11, 0, 202, 0, 32], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["+", 0, 213, 3, 4, 0, 28, 0, 74, 0, 24], ["...
8
445
using System; class Program { public static void Main(string[] args) { double n = double.Parse(Console.ReadLine()); int[] array = new int[(int)n]; for (int k = 0; k < array.Length; k++) { array[k] = int.Parse(Console.ReadLine()); } int cnt = 0; int m = 1; //?????£??????????????°???h=3??...
using System; class Program { public static void Main(string[] args) { double n = double.Parse(Console.ReadLine()); int[] array = new int[(int)n]; for (int k = 0; k < array.Length; k++) { array[k] = int.Parse(Console.ReadLine()); } int cnt = 0; int m = 1; //?????£??????????????°???h=3??...
[["-", 0, 7, 8, 196, 0, 52, 15, 16, 17, 67], ["+", 0, 7, 8, 196, 0, 52, 15, 16, 17, 98]]
8
449
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Globalization; namespace Prac { class Prog { public static void Main() { Stack<long> rpn = new Stack<long>(); var inputs = Console.ReadLine().Split(' '); var operant = 0L; foreach (var i in inputs) { ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Globalization; namespace Prac { class Prog { public static void Main() { Stack<long> rpn = new Stack<long>(); var inputs = Console.ReadLine().Split(' '); var operant = 0L; foreach (var i in inputs) { ...
[["+", 0, 213, 3, 4, 0, 28, 0, 241, 0, 33], ["+", 3, 4, 0, 28, 0, 241, 0, 23, 0, 24], ["+", 0, 23, 0, 16, 12, 213, 3, 4, 0, 25]]
8
198
using LIB; using System; using System.Linq; using System.Text; using System.Collections.Generic; class Program { public static IO IO = new IO(); static void Main(string[] args) { string[] n = IO.STRING(' '); STACK<string> s = new STACK<string>(n.Count()); for (int i = 0; i < n.Count(); i++) { if ...
using LIB; using System; using System.Linq; using System.Text; using System.Collections.Generic; class Program { public static IO IO = new IO(); static void Main(string[] args) { string[] n = IO.STRING(' '); STACK<string> s = new STACK<string>(n.Count()); for (int i = 0; i < n.Count(); i++) { if ...
[["+", 0, 204, 206, 207, 0, 28, 0, 16, 17, 33], ["+", 0, 204, 206, 207, 0, 28, 0, 16, 12, 203]]
8
1,176
using System; public class Program { public static int top; public static int[] S = new int[1000]; public static int Main() { int a, b; top = 0; string[] line = Console.ReadLine().Split(' '); for (int i = 0; i < line.Length; i++) { if (line[i] == "+") { a = pop(); b = pop()...
using System; public class Program { public static int top; public static int[] S = new int[1000]; public static int Main() { int a, b; top = 0; string[] line = Console.ReadLine().Split(' '); for (int i = 0; i < line.Length; i++) { if (line[i] == "+") { a = pop(); b = pop()...
[["-", 75, 57, 64, 196, 0, 1, 0, 11, 31, 22], ["+", 75, 57, 64, 196, 0, 1, 0, 11, 31, 22], ["-", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22]]
8
246
using System; using System.Collections.Generic; using System.Text; class Program { static void Main(string[] args) { string[] inputs = args[0].Split(new char[] { ' ' }); Stack<int> stack = new Stack<int>(); for (int i = 0; i < inputs.Length; i++) { switch (inputs[i]) { case "+": stac...
using System; using System.Collections.Generic; using System.Text; class Program { static void Main(string[] args) { string[] inputs = Console.ReadLine().Split(new char[] { ' ' }); Stack<int> stack = new Stack<int>(); for (int i = 0; i < inputs.Length; i++) { switch (inputs[i]) { case "+": ...
[["-", 0, 212, 0, 213, 63, 214, 205, 204, 205, 22], ["-", 0, 213, 63, 214, 205, 204, 206, 207, 0, 70], ["-", 63, 214, 205, 204, 206, 207, 0, 28, 0, 203], ["-", 0, 213, 63, 214, 205, 204, 206, 207, 0, 73], ["+", 0, 213, 63, 214, 205, 213, 63, 214, 205, 22], ["+", 0, 213, 63, 214, 205, 213, 63, 214, 0, 131], ["+", 0, 213...
8
203
using System; using System.Collections.Generic; public static class Program { public static void Main() { var stack = new Stack<int>(); foreach (var s in Console.ReadLine().Split(' ')) { switch (s) { case "+": stack.Push(stack.Pop() + stack.Pop()); break; case "-": i...
using System; using System.Collections.Generic; public static class Program { public static void Main() { var stack = new Stack<int>(); foreach (var s in Console.ReadLine().Split(' ')) { switch (s) { case "+": stack.Push(stack.Pop() + stack.Pop()); break; case "-": i...
[["-", 0, 213, 3, 4, 0, 28, 0, 16, 31, 22], ["-", 0, 213, 3, 4, 0, 28, 0, 16, 17, 33], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 17, 33], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 12, 22]]
8
170
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; namespace aizu1 { class Program { static void Main(string[] args) { string s = Console.ReadLine(); int n = int.Parse(s.Split(' ')[0]); int p = int.Parse(s.Split(' ')[1])...
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; namespace aizu1 { class Program { static void Main(string[] args) { string s = Console.ReadLine(); int n = int.Parse(s.Split(' ')[0]); int p = int.Parse(s.Split(' ')[1])...
[["-", 0, 28, 0, 16, 12, 23, 0, 16, 17, 72], ["+", 0, 16, 12, 23, 0, 11, 0, 202, 0, 107], ["-", 0, 52, 8, 196, 0, 57, 75, 196, 0, 46], ["+", 0, 52, 8, 196, 0, 57, 75, 196, 0, 46]]
8
274
using System; using System.IO; namespace DefaultNamespace { public class Class1 { static int n; //????????° static int quantum; static int head = 0; static int tail; static string[] name; static int[] time; static string[] results; static int totalTime = 0; static int r = 0; // results??¨??????????...
using System; using System.IO; namespace DefaultNamespace { public class Class1 { static int n; //????????° static int quantum; static int head = 0; static int tail; static string[] name; static int[] time; static string[] results; static int totalTime = 0; static int r = 0; // results??¨??????????...
[["-", 8, 196, 0, 1, 0, 11, 0, 202, 0, 107], ["+", 8, 196, 0, 1, 0, 11, 0, 202, 0, 32]]
8
457
using System; using System.Collections.Generic; public static class Program { public static void Main(string[] args) { // input string[] firstStr = Console.ReadLine().Split(' '); int processNum = int.Parse(firstStr[0]); int quantum = int.Parse(firstStr[1]); Queue<KeyValuePair<string, int>> queue...
using System; using System.Collections.Generic; public static class Program { public static void Main(string[] args) { // input string[] firstStr = Console.ReadLine().Split(' '); int processNum = int.Parse(firstStr[0]); int quantum = int.Parse(firstStr[1]); Queue<KeyValuePair<string, int>> queue...
[["-", 0, 28, 0, 16, 31, 16, 31, 5, 0, 62], ["-", 0, 28, 0, 16, 31, 16, 31, 5, 0, 222], ["+", 0, 28, 0, 16, 31, 16, 31, 214, 205, 22], ["+", 0, 28, 0, 16, 31, 16, 31, 214, 0, 131], ["+", 0, 28, 0, 16, 31, 16, 31, 214, 141, 22]]
8
257
using System; namespace ALDS1_3_C { class Program { static int[] S = new int[2000000]; static int top; static int last; static void Main(string[] args) { int n = getint("a"); for (int i = 0; i < n; i++) { string[] d = getsplit(); if (d[0] == "insert") { insert(getint(d[1])); ...
using System; namespace ALDS1_3_C { class Program { static int[] S = new int[2000000]; static int top; static int last; static void Main(string[] args) { int n = getint("a"); for (int i = 0; i < n; i++) { string[] d = getsplit(); if (d[0] == "insert") { insert(getint(d[1])); ...
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 35]]
8
453
using System; using System.Collections.Generic; using System.Text; class Program { public void Proc() { string inpt = Console.ReadLine(); // string inpt = @"\\///\_/\/\\\\/_/\\///_\\\\\/_/\"; Stack<int> s1 = new Stack<int>(); Stack<KeyValuePair<int, int>> s2 = new Stack<KeyValuePair<int, int>>(); ...
using System; using System.Collections.Generic; using System.Text; class Program { public void Proc() { string inpt = Console.ReadLine(); // string inpt = @"\\///\_/\/\\\\/_/\\///_\\\\\/_/\"; Stack<int> s1 = new Stack<int>(); Stack<KeyValuePair<int, int>> s2 = new Stack<KeyValuePair<int, int>>(); ...
[["-", 8, 196, 0, 7, 15, 16, 12, 214, 205, 22], ["+", 8, 196, 0, 7, 15, 16, 12, 214, 205, 22], ["-", 8, 196, 0, 7, 15, 16, 12, 214, 141, 22], ["+", 8, 196, 0, 7, 15, 16, 12, 214, 141, 22]]
8
371
using System; using System.Collections.Generic; using System.Text; namespace ALDS1_3_D_raiburari_ { class Program { class Pond { public int ichi; public int area; public Pond(int ichi, int area) { this.ichi = ichi; this.area = area; } } static void Main(string[] args) { string c...
using System; using System.Collections.Generic; using System.Text; namespace ALDS1_3_D_raiburari_ { class Program { class Pond { public int ichi; public int area; public Pond(int ichi, int area) { this.ichi = ichi; this.area = area; } } static void Main(string[] args) { string c...
[["-", 8, 196, 0, 1, 0, 11, 12, 5, 0, 222], ["+", 8, 196, 0, 1, 0, 11, 12, 5, 0, 222], ["-", 8, 196, 0, 1, 0, 11, 12, 214, 141, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 214, 141, 22], ["-", 75, 57, 75, 57, 15, 16, 12, 252, 0, 253], ["+", 75, 57, 75, 57, 15, 16, 12, 252, 0, 253]]
8
329
using System; using System.Collections.Generic; using System.Text; namespace ALDS1_3_D { class Program { static void Main(string[] args) { Dictionary<int, Stack<int>> dic = new Dictionary<int, Stack<int>>(); Stack<KeyValuePair<int, int>> stk = new Stack<KeyValuePair<int, int>>(); string input = Console....
using System; using System.Collections.Generic; using System.Text; namespace ALDS1_3_D { class Program { static void Main(string[] args) { Dictionary<int, Stack<int>> dic = new Dictionary<int, Stack<int>>(); Stack<KeyValuePair<int, int>> stk = new Stack<KeyValuePair<int, int>>(); string input = Console....
[["+", 8, 201, 0, 195, 8, 196, 0, 57, 0, 121], ["+", 8, 201, 0, 195, 8, 196, 0, 57, 0, 24], ["+", 0, 195, 8, 196, 0, 57, 15, 16, 31, 22], ["+", 0, 195, 8, 196, 0, 57, 15, 16, 17, 79], ["+", 0, 195, 8, 196, 0, 57, 15, 16, 12, 203], ["+", 8, 201, 0, 195, 8, 196, 0, 57, 0, 25]]
8
444
using System; using System.Collections.Generic; using System.Linq; namespace Elementary_data_structures { class Areas_on_the_Cross_Section_Diagram { static void Main(string[] args) { var token = Console.ReadLine(); short bottom = 0; short top = 0; short height = 0; for (int i = 0; i < token.Len...
using System; using System.Collections.Generic; using System.Linq; namespace Elementary_data_structures { class Areas_on_the_Cross_Section_Diagram { static void Main(string[] args) { var token = Console.ReadLine(); short bottom = 0; short top = 0; short height = 0; for (int i = 0; i < token.Leng...
[["+", 0, 7, 8, 196, 0, 57, 15, 16, 17, 98], ["+", 8, 196, 0, 57, 15, 16, 12, 16, 31, 22], ["+", 8, 196, 0, 57, 15, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 16, 12, 16, 12, 241, 0, 33], ["+", 0, 57, 15, 16, 12, 16, 12, 241, 0, 203]]
8
681
using System; namespace Test { class MainClass { public static void Main(string[] args) { Console.ReadLine(); var numsS = Array.ConvertAll(Console.ReadLine().TrimEnd().Split(), int.Parse); Console.ReadLine(); var numsT = Array.ConvertAll(Console.ReadLine().TrimEnd().Split(), int.Parse...
using System; namespace Test { class MainClass { public static void Main(string[] args) { Console.ReadLine(); var numsS = Array.ConvertAll(Console.ReadLine().TrimEnd().Split(), int.Parse); Console.ReadLine(); var numsT = Array.ConvertAll(Console.ReadLine().TrimEnd().Split(), int.Parse...
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 35]]
8
152
using System; namespace Test { class MainClass { public static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var numsS = new int[n + 1]; var nums = Array.ConvertAll(Console.ReadLine().TrimEnd().Split(), int.Parse); nums.CopyTo(numsS, 0); Console.ReadLine(); var num...
using System; namespace Test { class MainClass { public static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var numsS = new int[n + 1]; var nums = Array.ConvertAll(Console.ReadLine().TrimEnd().Split(), int.Parse); nums.CopyTo(numsS, 0); Console.ReadLine(); var num...
[["-", 8, 196, 0, 57, 15, 16, 31, 204, 205, 22], ["-", 0, 57, 15, 16, 31, 204, 206, 207, 0, 70], ["-", 0, 57, 15, 16, 31, 204, 206, 207, 0, 73]]
8
189
using System; using System.Collections.Generic; using System.Text; class Program { public void Proc() { // Linear Search int itemCount = int.Parse(Console.ReadLine()); int[] itemList = new int[itemCount]; string[] inpt = Console.ReadLine().Split(' '); for (int i = 0; i < itemCount; i++) { i...
using System; using System.Collections.Generic; using System.Text; class Program { public void Proc() { // Linear Search int itemCount = int.Parse(Console.ReadLine()); int[] itemList = new int[itemCount]; // int itemCount = int.Parse("500"); // string[] inpt = "0 933 743 262 529 700 508 752 256 2...
[["+", 0, 57, 64, 196, 0, 1, 0, 223, 0, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 223, 0, 29], ["+", 8, 196, 0, 57, 64, 196, 0, 1, 0, 35]]
8
304
using System; public class Program { public static bool search(int[] A, int n, int key) { int i = 0; A[n] = key; while (A[i] != key) i++; return true; } public static int Main() { int i, n, q, key, sum = 0; int[] A = new int[10000 + 1]; n = int.Parse(Console.ReadLine()); s...
using System; public class Program { public static bool search(int[] A, int n, int key) { int i = 0; A[n] = key; while (A[i] != key) i++; return i != n; } public static int Main() { int i, n, q, key, sum = 0; int[] A = new int[10000 + 1]; n = int.Parse(Console.ReadLine()); ...
[["-", 0, 195, 8, 196, 0, 37, 0, 211, 0, 146], ["+", 0, 195, 8, 196, 0, 37, 0, 16, 31, 22], ["+", 0, 195, 8, 196, 0, 37, 0, 16, 17, 79], ["+", 0, 195, 8, 196, 0, 37, 0, 16, 12, 22]]
8
234
using System; namespace ALDS1_4_A { class Program { static void Main(string[] args) { Console.WriteLine(); string[] s = getsplit(); Console.WriteLine(); string[] t = getsplit(); int count = 0; foreach (string T in t) { foreach (string S in s) { if (S == T) { count++;...
using System; namespace ALDS1_4_A { class Program { static void Main(string[] args) { Console.ReadLine(); string[] s = getsplit(); Console.ReadLine(); string[] t = getsplit(); int count = 0; foreach (string T in t) { foreach (string S in s) { if (S == T) { count++; ...
[["-", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22]]
8
177
using System; using System.Collections.Generic; namespace Project { class MainClass { public static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); string[] tmpS = Console.ReadLine().Split(' '); int[] S = new int[n]; for (int i = 0; i < n; i++) { S[i] = int.Parse(tmpS[i]); ...
using System; using System.Collections.Generic; namespace Project { class MainClass { public static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); string[] tmpS = Console.ReadLine().Split(' '); int[] S = new int[n]; for (int i = 0; i < n; i++) { S[i] = int.Parse(tmpS[i]); ...
[["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 45], ["+", 8, 196, 0, 57, 64, 196, 0, 1, 0, 35], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 46]]
8
237
using System.Collections.Generic; using System.Linq; using System.Text; using System; using System.IO; public class Playground { private static int[] item1; private static int[] item2; public static void Main(string[] args) { Input(); Method(); System.Console.ReadLine(); } private static void I...
using System.Collections.Generic; using System.Linq; using System.Text; using System; using System.IO; public class Playground { private static int[] item1; private static int[] item2; public static void Main(string[] args) { Input(); Method(); System.Console.ReadLine(); } private static void I...
[["-", 8, 201, 0, 195, 8, 196, 0, 210, 12, 22], ["+", 8, 201, 0, 195, 8, 196, 0, 210, 12, 22], ["-", 8, 196, 0, 210, 8, 196, 0, 210, 12, 22], ["+", 8, 196, 0, 210, 8, 196, 0, 210, 12, 22]]
8
196
using System; class Program { static void Main() { string[] s; int n = int.Parse(Console.ReadLine()); s = Console.ReadLine().Split(' '); int[] S = new int[n]; for (int i = 0; i < n; i++) S[i] = int.Parse(s[i]); int q = int.Parse(Console.ReadLine()); s = Console.ReadLine().Split(...
using System; class Program { static void Main() { string[] s; int n = int.Parse(Console.ReadLine()); s = Console.ReadLine().Split(' '); int[] S = new int[n]; for (int i = 0; i < n; i++) S[i] = int.Parse(s[i]); int q = int.Parse(Console.ReadLine()); s = Console.ReadLine().Split(...
[["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 45], ["+", 8, 196, 0, 57, 64, 196, 0, 1, 0, 35], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 46]]
8
220
using System; namespace A { class A { static void Main(string[] args) { int n, q, i, count = 0; string a; string[] b = new string[10000]; int[] S = new int[1000000000]; int[] T = new int[1000000000]; LinerSearch search = new LinerSearch(); a = Console.ReadLine(); n = int.Parse(a); ...
using System; namespace A { class A { static void Main(string[] args) { int n, q, i, count = 0; string a; string[] b = new string[30000]; int[] S = new int[10000]; int[] T = new int[10000]; LinerSearch search = new LinerSearch(); a = Console.ReadLine(); n = int.Parse(a); b = Conso...
[["-", 0, 212, 0, 227, 39, 224, 225, 226, 0, 203], ["+", 0, 212, 0, 227, 39, 224, 225, 226, 0, 203]]
8
297
using System; using System.Linq; using System.Collections.Generic; public class BinarySearch { public static void Main() { Console.ReadLine(); var sList = ReadLineAndToIntList(); Console.ReadLine(); var tList = ReadLineAndToIntList(); int count = 0; tList.ForEach(t => { if (MyBinarySea...
using System; using System.Linq; using System.Collections.Generic; public class BinarySearch { public static void Main() { Console.ReadLine(); var sList = ReadLineAndToIntList(); Console.ReadLine(); var tList = ReadLineAndToIntList(); int count = 0; tList.ForEach(t => { if (MyBinarySea...
[["-", 0, 198, 0, 200, 0, 212, 0, 16, 17, 33], ["-", 0, 198, 0, 200, 0, 212, 0, 16, 12, 203]]
8
217
using System; using System.Linq; using System.Collections.Generic; public class BinarySearch { public static void Main() { Console.ReadLine(); var sList = ReadLineAndToIntList(); Console.ReadLine(); var tList = ReadLineAndToIntList(); int count = 0; foreach (var s in sList) { if (tLis...
using System; using System.Linq; using System.Collections.Generic; public class BinarySearch { public static void Main() { Console.ReadLine(); var sList = ReadLineAndToIntList(); Console.ReadLine(); var tList = ReadLineAndToIntList(); int count = 0; foreach (int t in tList) { if (sLis...
[["-", 0, 195, 8, 196, 0, 210, 39, 216, 0, 217], ["-", 8, 201, 0, 195, 8, 196, 0, 210, 31, 22], ["+", 8, 201, 0, 195, 8, 196, 0, 210, 39, 199], ["+", 8, 201, 0, 195, 8, 196, 0, 210, 31, 22], ["-", 8, 201, 0, 195, 8, 196, 0, 210, 12, 22], ["+", 8, 201, 0, 195, 8, 196, 0, 210, 12, 22], ["-", 0, 57, 15, 16, 31, 213, 63, 2...
8
129
using System.Collections.Generic; using System.Linq; using System.Text; using System; using System.IO; public class Playground { private static int[] item1; private static int[] item2; public static void Main(string[] args) { Input(); Method(); System.Console.ReadLine(); } private static void I...
using System.Collections.Generic; using System.Linq; using System.Text; using System; using System.IO; public class Playground { private static int[] item1; private static int[] item2; public static void Main(string[] args) { Input(); Method(); System.Console.ReadLine(); } private static void I...
[["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203], ["-", 8, 201, 0, 195, 8, 196, 0, 197, 0, 35]]
8
194
using System; using System.Linq; namespace ALDS1_4_D { class Program { static void Main(string[] args) { string[] input = Console.ReadLine().Split(' '); int N = int.Parse(input[0]); int k = int.Parse(input[1]); int[] bag = new int[N]; int total = 0; for (int i = 0; i < N; i++) { bag[i] ...
using System; using System.Linq; namespace ALDS1_4_D { class Program { static void Main(string[] args) { string[] input = Console.ReadLine().Split(' '); int N = int.Parse(input[0]); int k = int.Parse(input[1]); int[] bag = new int[N]; int total = 0; for (int i = 0; i < N; i++) { bag[i] ...
[["+", 0, 198, 0, 200, 0, 212, 0, 16, 17, 33], ["+", 0, 198, 0, 200, 0, 212, 0, 16, 12, 203]]
8
256
using System; namespace ASDS1_4_wariate_ { class Program { class hikkoshi { public int P; public int k; public int[] A; public hikkoshi(int P, int k, int[] A) { this.P = P; this.k = k; this.A = A; } } static void Main(string[] args) { var input = getsplit(); int n =...
using System; namespace ASDS1_4_wariate_ { class Program { class hikkoshi { public int P; public int k; public int[] A; public hikkoshi(int P, int k, int[] A) { this.P = P; this.k = k; this.A = A; } } static void Main(string[] args) { var input = getsplit(); int n =...
[["+", 75, 196, 0, 57, 15, 16, 31, 16, 31, 22], ["+", 75, 196, 0, 57, 15, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 16, 31, 16, 12, 214, 205, 22], ["+", 0, 57, 15, 16, 31, 16, 12, 214, 0, 131], ["+", 0, 57, 15, 16, 31, 16, 12, 214, 141, 22], ["+", 0, 57, 75, 196, 0, 57, 15, 16, 17, 106]]
8
387
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace aizu1 { public class Solution { public static void Main(string[] args) { string[] s = Console.ReadLine().Split(' '); int n = int.Parse(s[0]); int k = int.Parse(s[1]); int[] w = ne...
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace aizu1 { public class Solution { public static void Main(string[] args) { string[] s = Console.ReadLine().Split(' '); int n = int.Parse(s[0]); int k = int.Parse(s[1]); int[] w = ne...
[["+", 0, 52, 15, 16, 12, 16, 31, 23, 0, 24], ["-", 0, 52, 15, 16, 12, 16, 31, 16, 17, 72], ["+", 12, 16, 31, 23, 0, 11, 0, 202, 0, 107], ["+", 0, 52, 15, 16, 12, 16, 31, 23, 0, 25]]
8
275
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Practice { class Program { static void Main(string[] args) { SolveA(args); // SolveB(args); // SolveC(args); // SolveD(args); } private static int s_compareTotal = 0; static void SolveA(string[] args...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Practice { class Program { static void Main(string[] args) { SolveA(args); // SolveB(args); // SolveC(args); // SolveD(args); } private static int s_compareTotal = 0; static void SolveA(string[] args...
[["-", 0, 57, 15, 16, 12, 16, 31, 214, 205, 22], ["+", 0, 57, 15, 16, 12, 16, 31, 214, 205, 22], ["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 45], ["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 46]]
8
470
using System; using System.Linq; using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); int[] S = Console.ReadLine().Split(' ').Select(val => int.Parse(val)).ToArray(); Sort.Merg...
using System; using System.Linq; using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); int[] S = Console.ReadLine().Split(' ').Select(val => int.Parse(val)).ToArray(); Sort.Merg...
[["-", 0, 195, 8, 196, 0, 1, 0, 223, 0, 22], ["-", 0, 195, 8, 196, 0, 1, 0, 223, 0, 29], ["-", 8, 201, 0, 195, 8, 196, 0, 1, 0, 35], ["+", 0, 7, 8, 196, 0, 1, 0, 223, 0, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 223, 0, 29], ["+", 8, 196, 0, 7, 8, 196, 0, 1, 0, 35]]
8
428
using System; using System.Collections.Generic; using System.Text; class Program { public void Proc() { int procCnt = int.Parse(Console.ReadLine()); PPoint a = new PPoint(0, 0); PPoint b = new PPoint(100, 0); Console.WriteLine(a.X.ToString("0.00000000") + " " + a.Y.ToString("0....
using System; using System.Collections.Generic; using System.Text; class Program { public void Proc() { int procCnt = int.Parse(Console.ReadLine()); PPoint a = new PPoint(0, 0); PPoint b = new PPoint(100, 0); Console.WriteLine(a.X.ToString("0.00000000") + " " + a.Y.ToString("0....
[["-", 0, 200, 0, 212, 0, 16, 31, 16, 17, 48], ["-", 0, 200, 0, 212, 0, 16, 31, 16, 12, 250], ["-", 0, 198, 0, 200, 0, 212, 0, 16, 12, 250], ["+", 0, 198, 0, 200, 0, 212, 0, 16, 12, 203], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 72]]
8
570
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace aizu1 { public class Solution { static double cos = Math.Cos(60 * Math.PI / 180); static double sin = Math.Sin(60 * Math.PI / 180); public static void Main(string[] args) { int n = int.Pa...
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace aizu1 { public class Solution { static double cos = Math.Cos(60 * Math.PI / 180); static double sin = Math.Sin(60 * Math.PI / 180); public static void Main(string[] args) { int n = int.Pa...
[["-", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["-", 0, 1, 0, 11, 12, 16, 12, 5, 0, 222], ["+", 0, 1, 0, 11, 12, 16, 12, 5, 0, 44]]
8
542
using System; class Program { static void CountingSort(int[] A, int[] B, int k) { var C = new int[k + 1]; for (var j = 0; j < A.Length; j++) { C[A[j]]++; } var remain = B.Length - 1; for (; k >= 0; k--) { while (C[k] > 0) { B[remain] = k; remain--; C[k]--; ...
using System; class Program { static void CountingSort(int[] A, int[] B, int k) { var C = new int[k + 1]; for (var j = 0; j < A.Length; j++) { C[A[j]]++; } var remain = B.Length - 1; for (; k >= 0; k--) { while (C[k] > 0) { B[remain] = k; remain--; C[k]--; ...
[["-", 0, 7, 8, 196, 0, 57, 15, 16, 17, 79], ["-", 0, 7, 8, 196, 0, 57, 15, 16, 12, 203], ["+", 0, 7, 8, 196, 0, 57, 15, 16, 17, 18], ["+", 0, 57, 15, 16, 12, 16, 31, 214, 205, 22], ["+", 0, 57, 15, 16, 12, 16, 31, 214, 0, 131], ["+", 0, 57, 15, 16, 12, 16, 31, 214, 141, 22], ["+", 8, 196, 0, 57, 15, 16, 12, 16, 17, 33...
8
297
using System; using System.Linq; using System.Text; namespace ALDS1_6_A { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); string[] input = Console.ReadLine().Split(' '); int[] A = new int[n + 1]; int[] B = new int[n + 1]; int[] C = new int[10001]; fo...
using System; using System.Linq; using System.Text; namespace ALDS1_6_A { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); string[] input = Console.ReadLine().Split(' '); int[] A = new int[n + 1]; int[] B = new int[n + 1]; int[] C = new int[10001]; fo...
[["-", 10, 198, 0, 200, 0, 212, 0, 16, 17, 33], ["-", 10, 198, 0, 200, 0, 212, 0, 16, 12, 203], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 20], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 47]]
8
261
using System; using System.Collections.Generic; using System.Linq; class Program { static string ReadLine() { return Console.ReadLine(); } static int ReadInt() { return int.Parse(ReadLine()); } static int[] ReadInts() { return ReadLine().Split().Select(int.Parse).ToArray(); } static string[] ReadStrings(...
using System; using System.Collections.Generic; using System.Linq; class Program { static string ReadLine() { return Console.ReadLine(); } static int ReadInt() { return int.Parse(ReadLine()); } static int[] ReadInts() { return ReadLine().Split().Select(int.Parse).ToArray(); } static string[] ReadStrings(...
[["-", 0, 7, 8, 196, 0, 57, 15, 16, 17, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 16, 17, 19]]
8
310
// Partition.cs using System; class Partition { public static void Main() { int n = int.Parse(Console.ReadLine()); string[] str = Console.ReadLine().Split(' '); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = int.Parse(str[i]); } int r = a[a.Length - 1], p = 0, q = 0, sw...
// Partition.cs using System; class Partition { public static void Main() { int n = int.Parse(Console.ReadLine()); string[] str = Console.ReadLine().Split(' '); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = int.Parse(str[i]); } int r = a[a.Length - 1], p = 0, q = 0, sw...
[["+", 0, 7, 8, 196, 0, 57, 15, 16, 17, 98], ["+", 0, 57, 15, 16, 12, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 16, 12, 16, 31, 16, 17, 33], ["+", 0, 57, 15, 16, 12, 16, 31, 16, 12, 203], ["+", 8, 196, 0, 57, 15, 16, 12, 16, 17, 60], ["+", 8, 196, 0, 57, 15, 16, 12, 16, 12, 22]]
8
305
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Satoshi { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); string[] s = Console.ReadLine().Split(' '); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i]...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Satoshi { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); string[] s = Console.ReadLine().Split(' '); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i]...
[["-", 0, 7, 8, 196, 0, 57, 15, 16, 12, 22], ["+", 8, 196, 0, 57, 15, 16, 12, 16, 31, 22], ["+", 8, 196, 0, 57, 15, 16, 12, 16, 17, 33], ["+", 8, 196, 0, 57, 15, 16, 12, 16, 12, 203]]
8
348
using System; namespace ALDS1_6_B { static class Swapper { public static void Integer(ref int a, ref int b) { if (a == b) return; a ^= b; b ^= a; a ^= b; } } static class Algorithm { public delegate void SwapperAction<T>(ref T a, ref T b); public static int Partition<T>(T[] a, int s, int ...
using System; namespace ALDS1_6_B { static class Swapper { public static void Integer(ref int a, ref int b) { if (a == b) return; a ^= b; b ^= a; a ^= b; } } static class Algorithm { public delegate void SwapperAction<T>(ref T a, ref T b); public static int Partition<T>(T[] a, int s, int ...
[["-", 0, 7, 8, 196, 0, 57, 15, 16, 17, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 16, 17, 19]]
8
303
using System; using System.Collections.Generic; using System.Linq; using System.IO; using System.Globalization; using System.Diagnostics; using Pair = System.Collections.Generic.KeyValuePair<int, int>; class Program { static void Main() { Console.SetOut( new StreamWriter(Console.OpenStandardOutput()) { A...
using System; using System.Collections.Generic; using System.Linq; using System.IO; using System.Globalization; using System.Diagnostics; using Pair = System.Collections.Generic.KeyValuePair<int, int>; class Program { static void Main() { Console.SetOut( new StreamWriter(Console.OpenStandardOutput()) { A...
[["+", 0, 213, 3, 4, 0, 28, 0, 16, 17, 33], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 12, 203]]
8
803
using System; using System.Text; using System.Collections.Generic; using System.Linq; class Solve { public Solve() {} StringBuilder sb; public static int Main() { new Solve().Run(); return 0; } void Run() { sb = new StringBuilder(); Calc(); Console.Write(sb.ToString()); } void Calc() {...
using System; using System.Text; using System.Collections.Generic; using System.Linq; class Solve { public Solve() {} StringBuilder sb; public static int Main() { new Solve().Run(); return 0; } void Run() { sb = new StringBuilder(); Calc(); Console.Write(sb.ToString()); } void Calc() {...
[["+", 0, 230, 3, 4, 0, 28, 0, 16, 17, 72], ["+", 0, 230, 3, 4, 0, 28, 0, 16, 12, 203]]
8
1,025
using System.Collections.Generic; using System.Linq; using System; public class PriorityQueue<T> where T : IComparable { private IComparer<T> _comparer = null; private int _type = 0; private T[] _heap; private int _sz = 0; private int _count = 0; /// <summary> /// Priority Queue with custom comparer ...
using System.Collections.Generic; using System.Linq; using System; public class PriorityQueue<T> where T : IComparable { private IComparer<T> _comparer = null; private int _type = 0; private T[] _heap; private int _sz = 0; private int _count = 0; /// <summary> /// Priority Queue with custom comparer ...
[["-", 8, 196, 0, 52, 15, 16, 31, 223, 0, 29], ["+", 8, 196, 0, 57, 64, 196, 0, 1, 0, 35], ["+", 0, 57, 64, 196, 0, 1, 0, 223, 0, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 223, 0, 29]]
8
1,039
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ITP1_10_A { public class Program { public static void Main(string[] args) { int[] line = ReadIntAr(); Console.WriteLine("{0}", Math.Sqrt(Math.Pow((line[2] - line[0]), 2) + M...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ITP1_10_A { public class Program { public static void Main(string[] args) { double[] line = ReadDoubleAr(); Console.WriteLine("{0}", Math.Sqrt(Math.Pow((line[2] - line[0]), 2) + ...
[["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 0, 198, 0, 200, 0, 212, 0, 213, 63, 22], ["+", 0, 198, 0, 200, 0, 212, 0, 213, 63, 22]]
8
323
using System; using System.Linq; namespace ITP1_10_A { class Program { static void Main(string[] args) { int[] input = Console.ReadLine().Split(' ').Select(x => Convert.ToInt32(x)).ToArray(); double distance = Math.Sqrt(Math.Pow((input[3] - input[1]), 2) + Math.Pow((in...
using System; using System.Linq; namespace ITP1_10_A { class Program { static void Main(string[] args) { double[] input = Console.ReadLine() .Split(' ') .Select(x => Convert.ToDouble(x)) .ToArray(); double distance = Math.Sqrt(Math.Po...
[["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 0, 28, 0, 218, 8, 213, 63, 214, 141, 22], ["+", 0, 28, 0, 218, 8, 213, 63, 214, 141, 22], ["-", 0, 16, 12, 204, 206, 207, 0, 28, 0, 203], ["+", 0, 16, 12, 204, 206, 207, 0, 28, 0, 203], ["-", 0, 16, 12, 213, 3, 4, 0...
8
121
using System; public class Class1 { public static void Main(String[] args) { string data = Console.ReadLine(); string[] xxyy = data.Split(); double x1 = double.Parse(xxyy[0]); double x2 = double.Parse(xxyy[1]); double y1 = double.Parse(xxyy[2]); double y2 = double.Parse(xxyy[3]); double a...
using System; public class Class1 { public static void Main(String[] args) { string data = Console.ReadLine(); string[] xxyy = data.Split(); double x1 = double.Parse(xxyy[0]); double y1 = double.Parse(xxyy[1]); double x2 = double.Parse(xxyy[2]); double y2 = double.Parse(xxyy[3]); double a...
[["-", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["+", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22]]
8
129
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication48 { class Program { static void Main(string[] args) { int[] a = Console.ReadLine().Split().Select(int.Parse).ToArray(); double b = a[0] - a[2]; double c = a[1] - a[3]; b = b * b; c =...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication48 { class Program { static void Main(string[] args) { double[] a = Console.ReadLine().Split().Select(double.Parse).ToArray(); double b = a[0] - a[2]; double c = a[1] - a[3]; b = b * b; ...
[["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["+", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199]]
8
126
using System; using System.Linq; namespace _10_A { class Program { static void Main(string[] args) { int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray(); Console.WriteLine(Math.Sqrt((x[0] - x[2]) * (x[0] - x[2]) + (x[1] - x[3]) * (x[1] - x[3]))); Console.ReadL...
using System; using System.Linq; namespace _10_A { class Program { static void Main() { double[] x = Console.ReadLine().Split().Select(double.Parse).ToArray(); Console.WriteLine(Math.Sqrt((x[0] - x[2]) * (x[0] - x[2]) + (x[1] - x[3]) * (x[1] - x[3]))); Console.ReadLine(); ...
[["-", 0, 195, 54, 55, 0, 220, 39, 224, 39, 199], ["-", 54, 55, 0, 220, 39, 224, 225, 226, 0, 70], ["-", 54, 55, 0, 220, 39, 224, 225, 226, 0, 73], ["-", 8, 201, 0, 195, 54, 55, 0, 220, 141, 22], ["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 205, 213, 3, 4, 0, 2...
8
117
using System; using System.IO; using System.Linq; using System.Collections.Generic; public class Program { public void Proc() { double[] inpt = Reader.ReadLine().Split(' ').Select(a => double.Parse(a)).ToArray(); double ans = Math.Sqrt(Math.Pow(inpt[0] - inpt[2], 2) + Mat...
using System; using System.IO; using System.Linq; using System.Collections.Generic; public class Program { public void Proc() { double[] inpt = Reader.ReadLine().Split(' ').Select(a => double.Parse(a)).ToArray(); double ans = Math.Sqrt(Math.Pow(inpt[0] - inpt[2], 2) + Mat...
[["-", 0, 28, 0, 16, 12, 213, 63, 214, 141, 22], ["-", 0, 28, 0, 16, 12, 213, 3, 4, 0, 24], ["-", 3, 4, 0, 28, 0, 213, 63, 214, 205, 22], ["-", 3, 4, 0, 28, 0, 213, 63, 214, 0, 131], ["-", 0, 200, 0, 212, 0, 213, 3, 4, 0, 25], ["-", 0, 124, 0, 198, 0, 200, 0, 212, 0, 258], ["+", 0, 124, 0, 198, 0, 200, 0, 212, 0, 258]]
8
239
using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; using System.Text; namespace LogicSummoner { class Program { static void Main(string[] args) { var line = GetNumbersInt(); Console.WriteLine("{0:F8}", Math.Sqrt((line[0] - lin...
using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; using System.Text; namespace LogicSummoner { class Program { static void Main(string[] args) { var line = GetNumbersDouble(); Console.WriteLine("{0:F8}", Math.Sqrt((line[0] - ...
[["-", 0, 198, 0, 200, 0, 212, 0, 213, 63, 22], ["+", 0, 198, 0, 200, 0, 212, 0, 213, 63, 22]]
8
377
using System; public class hello { public static void Main() { string[] s = Console.ReadLine().Trim().Split(' '); var x1 = int.Parse(s[0]); var y1 = int.Parse(s[1]); var x2 = int.Parse(s[2]); var y2 = int.Parse(s[3]); var buf = Math.Pow((y2 - y1), 2) + Math.Pow((x2 - x1), 2); var result...
using System; public class hello { public static void Main() { string[] s = Console.ReadLine().Trim().Split(' '); var x1 = double.Parse(s[0]); var y1 = double.Parse(s[1]); var x2 = double.Parse(s[2]); var y2 = double.Parse(s[3]); var buf = Math.Pow((y2 - y1), 2) + Math.Pow((x2 - x1), 2); ...
[["-", 0, 200, 0, 212, 0, 213, 63, 214, 205, 199], ["+", 0, 200, 0, 212, 0, 213, 63, 214, 205, 199]]
8
136
using System; class Program { static void Main() { int[] num = Console.ReadLine().Split(' ').toIntArray(); Vector vec1 = new Vector(num[0], num[1]); Vector vec2 = new Vector(num[2], num[3]); Console.WriteLine(vec2.subVector(vec1).norm().ToString()); } } class Vector { public double X; public ...
using System; class Program { static void Main() { double[] num = Console.ReadLine().Split(' ').toDoubleArray(); Vector vec1 = new Vector(num[0], num[1]); Vector vec2 = new Vector(num[2], num[3]); Console.WriteLine(vec2.subVector(vec1).norm().ToString()); } } class Vector { public double X; p...
[["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 0, 200, 0, 212, 0, 213, 63, 214, 141, 22], ["+", 0, 200, 0, 212, 0, 213, 63, 214, 141, 22], ["-", 0, 235, 8, 201, 0, 195, 39, 224, 39, 199], ["+", 0, 235, 8, 201, 0, 195, 39, 224, 39, 199], ["-", 0, 208, 0, 235, 8, ...
8
243
using System; namespace ConsoleApplication26 { class Program { static void Main(string[] args) { string[] input = Console.ReadLine().Split(' '); double a = double.Parse(input[0]); double b = double.Parse(input[1]); double c = double.Parse(input[2]); double h = b * Math.Sin(c * (Math.PI / 180)); ...
using System; namespace ConsoleApplication26 { class Program { static void Main(string[] args) { string[] input = Console.ReadLine().Split(' '); double a = double.Parse(input[0]); double b = double.Parse(input[1]); double c = double.Parse(input[2]); double h = b * Math.Sin(c * (Math.PI / 180)); ...
[["-", 3, 4, 0, 28, 0, 16, 12, 16, 31, 22], ["+", 3, 4, 0, 28, 0, 16, 12, 16, 31, 22]]
8
212