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
change_count
int64
0
100
using System; using System.Collections.Generic; public class Program { public static void Main() { string[] str = Console.ReadLine().Split(' '); int A = int.Parse(str[0]); int B = int.Parse(str[0]); int C = int.Parse(str[0]); if (B + C > A) { Console.WriteLine(B + C - A); } else { ...
using System; using System.Collections.Generic; public class Program { public static void Main() { string[] str = Console.ReadLine().Split(' '); int A = int.Parse(str[0]); int B = int.Parse(str[1]); int C = int.Parse(str[2]); if ((B + C) > A) { Console.WriteLine((B + C) - A); } else { ...
[["-", 0, 28, 0, 204, 206, 207, 0, 28, 0, 203], ["+", 0, 28, 0, 204, 206, 207, 0, 28, 0, 203], ["+", 8, 201, 0, 195, 8, 196, 0, 57, 0, 24], ["+", 8, 196, 0, 57, 15, 16, 31, 23, 0, 25], ["+", 3, 4, 0, 28, 0, 16, 31, 23, 0, 24], ["+", 3, 4, 0, 28, 0, 16, 31, 23, 0, 25]]
8
111
8
using System; namespace Answer { class Program { public static void Main(string[] args) { char[] charSeparators = new char[] { ',' }; var values = Console.ReadLine().Split( charSeparators, StringSplitOptions.RemoveEmptyEntries); var A = int.Parse(values[0]); var B = int.Parse(values[1]); v...
using System; namespace Answer { class Program { public static void Main(string[] args) { char[] charSeparators = new char[] { ' ' }; var values = Console.ReadLine().Split( charSeparators, StringSplitOptions.RemoveEmptyEntries); var A = int.Parse(values[0]); var B = int.Parse(values[1]); v...
[["-", 0, 212, 0, 227, 0, 229, 0, 252, 0, 253], ["+", 0, 212, 0, 227, 0, 229, 0, 252, 0, 253]]
8
120
2
using System; using System.Text; using System.Linq; class Program { static void Main(string[] args) { #if DEBUG System.Diagnostics.Debug.WriteLine("-----TextFile1"); System.Diagnostics.Debug.WriteLine(process("../TextFile1.txt")); System.Diagnostics.Debug.WriteLine("-----TextFile2"); System.Diagnosti...
using System; using System.Text; using System.Linq; class Program { static void Main(string[] args) { #if DEBUG System.Diagnostics.Debug.WriteLine("-----TextFile1"); System.Diagnostics.Debug.WriteLine(process("../TextFile1.txt")); System.Diagnostics.Debug.WriteLine("-----TextFile2"); System.Diagnosti...
[["-", 0, 213, 63, 214, 205, 213, 63, 214, 141, 22], ["+", 0, 213, 63, 214, 205, 213, 63, 214, 141, 22]]
8
360
2
using System; using System.Linq; using System.Collections.Generic; namespace AtCoder { class Program { static void Main(string[] args) { MainStream(); } static void MainStream() { Scan sc = new Scan(); write wr = new write(); int r = sc.intarr[0]; wr.wri(3 * r * r * r); } } class Scan { publ...
using System; using System.Linq; using System.Collections.Generic; namespace AtCoder { class Program { static void Main(string[] args) { MainStream(); } static void MainStream() { Scan sc = new Scan(); write wr = new write(); int r = sc.intarr[0]; wr.wri(3 * r * r); } } class Scan { public s...
[["-", 0, 213, 3, 4, 0, 28, 0, 16, 17, 48], ["-", 0, 213, 3, 4, 0, 28, 0, 16, 12, 22]]
8
246
2
using System; using System.Collections.Generic; using System.Linq; public class Solution { public static void Main() { var r = long.Parse(Console.ReadLine()); var s = 3 * r ^ 2; Console.WriteLine($"{s}"); } }
using System; using System.Collections.Generic; using System.Linq; public class Solution { public static void Main() { var r = int.Parse(Console.ReadLine()); var s = 3 * r * r; Console.WriteLine($"{s}"); } }
[["-", 0, 200, 0, 212, 0, 213, 63, 214, 205, 199], ["+", 0, 200, 0, 212, 0, 213, 63, 214, 205, 199], ["-", 0, 198, 0, 200, 0, 212, 0, 16, 17, 140], ["-", 0, 198, 0, 200, 0, 212, 0, 16, 12, 203], ["+", 0, 198, 0, 200, 0, 212, 0, 16, 17, 48], ["+", 0, 198, 0, 200, 0, 212, 0, 16, 12, 22]]
8
62
6
using System; namespace CSharpTest { class MainClass { public static void Main(string[] args) { var mainclass = new MainClass(); mainclass.calc(); } private void calc() { int inp = int.Parse(Console.ReadLine()); Console.WriteLine(3 * (inp ^ 2)); } } }
using System; namespace CSharpTest { class MainClass { public static void Main(string[] args) { var mainclass = new MainClass(); mainclass.calc(); } private void calc() { Int64 inp = int.Parse(Console.ReadLine()); Console.WriteLine(3 * Math.Pow(inp, 2)); } } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 22], ["+", 0, 28, 0, 16, 12, 213, 63, 214, 205, 22], ["+", 0, 28, 0, 16, 12, 213, 63, 214, 0, 131], ["+", 0, 28, 0, 16, 12, 213, 63, 214, 141, 22], ["-", 0, 28, 0, 16, 12, 23, 0, 16, 17, 140], ["+", 0, 28, 0, 16, 12, 213, 3, 4, 0...
8
71
7
using System; using static System.Console; namespace AC_Field { class AtCoder { static void Main() { int r; r = int.Parse(ReadLine()); WriteLine(3 * r ^ 2); } } }
using System; using static System.Console; namespace AC_Field { class AtCoder { static void Main() { int r; r = int.Parse(ReadLine()); WriteLine(3 * r * r); } } }
[["-", 0, 213, 3, 4, 0, 28, 0, 16, 17, 140], ["-", 0, 213, 3, 4, 0, 28, 0, 16, 12, 203], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 17, 48], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 12, 22]]
8
47
4
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Collections; static class Extensions { public static int ToInt(this string s) => int.Parse(s); public static long ToLong(this string s) => long.Pars...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Collections; static class Extensions { public static int ToInt(this string s) => int.Parse(s); public static long ToLong(this string s) => long.Pars...
[["-", 0, 213, 3, 4, 0, 28, 0, 16, 17, 48], ["-", 0, 213, 3, 4, 0, 28, 0, 16, 12, 22]]
8
644
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program { static void Main(string[] args) { var wrong_answer = new wrong_answer(); wrong_answer.Solve(); } } public class wrong_answer { const int INF = 1 << 30; const long INFL = ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program { static void Main(string[] args) { var wrong_answer = new wrong_answer(); wrong_answer.Solve(); } } public class wrong_answer { const int INF = 1 << 30; const long INFL = ...
[["-", 0, 198, 0, 200, 0, 212, 0, 214, 141, 22], ["+", 0, 198, 0, 200, 0, 212, 0, 214, 141, 22]]
8
874
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { class Program { static void Main(string[] args) { var ND = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse); int N = ND[0]; int D = ND[1]; double ans ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { class Program { static void Main(string[] args) { var ND = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse); double N = ND[0]; double D = ND[1]; doubl...
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
112
4
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp23 { class Program { static void Main(string[] args) { //入力 string s = Console.ReadLine(); int N = int.Parse(s.Split(' ')[0]); int D = int.Parse(s.Split(' ')[1]); ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp23 { class Program { static void Main(string[] args) { //入力 string s = Console.ReadLine(); int N = int.Parse(s.Split(' ')[0]); int D = int.Parse(s.Split(' ')[1]); ...
[["-", 0, 28, 0, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 28, 0, 16, 31, 23, 0, 16, 17, 33]]
8
124
2
using System; using System.Collections.Generic; using System.Linq; public class Solution { public static void Main() { string str = Console.ReadLine(); string[] arr = str.Split(' '); var N = double.Parse(arr[0]); var D = double.Parse(arr[1]); // 1人が確認できる木の本数は、(i+D) - (i-D) + 1 = 2D+1のため、 // 求...
using System; using System.Collections.Generic; using System.Linq; public class Solution { public static void Main() { string str = Console.ReadLine(); string[] arr = str.Split(' '); var N = double.Parse(arr[0]); var D = double.Parse(arr[1]); // 1人が確認できる木の本数は、(i+D) - (i-D) + 1 = 2D+1のため、 // 求...
[["-", 3, 4, 0, 28, 0, 283, 0, 284, 0, 22], ["-", 3, 4, 0, 28, 0, 283, 0, 284, 0, 46], ["-", 0, 213, 3, 4, 0, 28, 0, 283, 0, 296], ["-", 3, 4, 0, 28, 0, 283, 0, 284, 0, 45]]
8
118
4
using System; using System.Linq; namespace Welcome_to_AtCoder { class Program { static void Main(string[] args) { string input = Console.ReadLine(); var array = input.Split(' ').Select(_ => int.Parse(_)).ToArray(); var n = array[0]; var d = array[1]; var hoge = d * 2; int result = n % hoge =...
using System; using System.Linq; namespace Welcome_to_AtCoder { class Program { static void Main(string[] args) { string input = Console.ReadLine(); var array = input.Split(' ').Select(_ => int.Parse(_)).ToArray(); var n = array[0]; var d = array[1]; var hoge = d * 2 + 1; int result = n % ho...
[["+", 0, 198, 0, 200, 0, 212, 0, 16, 17, 72], ["+", 0, 198, 0, 200, 0, 212, 0, 16, 12, 203]]
8
117
2
using System; using System.IO; using System.Collections.Generic; namespace _134 { class Program { static void Main(string[] args) { // Console.SetIn(new StreamReader("input.txt")); solve_134B(); } public static void solve_134B() { string[] nd = Console.ReadLine().Split(' '); int n = Convert.ToIn...
using System; using System.IO; using System.Collections.Generic; namespace _134 { class Program { static void Main(string[] args) { // Console.SetIn(new StreamReader("input.txt")); solve_134B(); } public static void solve_134B() { string[] nd = Console.ReadLine().Split(' '); int n = Convert.ToIn...
[["+", 0, 41, 64, 16, 12, 23, 0, 16, 17, 72], ["+", 0, 41, 64, 16, 12, 23, 0, 16, 12, 203]]
8
166
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program_B { static void Main(string[] args) { float N = 0; var D = 0; { var input = Console.ReadLine().Split(' '); N = float.Parse(input[0]); D = Int32.Parse(input[1...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program_B { static void Main(string[] args) { float N = 0; var D = 0; { var input = Console.ReadLine().Split(' '); N = float.Parse(input[0]); D = Int32.Parse(input[1...
[["+", 0, 16, 12, 23, 0, 16, 31, 16, 17, 48], ["+", 0, 16, 12, 23, 0, 16, 31, 16, 12, 203]]
8
112
2
using System; using System.Collections.Generic; class Program { static void Main(string[] args) { string[] s = Console.ReadLine().Split(' '); int n = int.Parse(s[0]), d = int.Parse(s[1]); int ans = n / (2 * d); if (n % (2 * d) != 0) ans++; Console.WriteLine(ans); } } // mcs Main.cs // mon...
using System; using System.Collections.Generic; class Program { static void Main(string[] args) { string[] s = Console.ReadLine().Split(' '); int n = int.Parse(s[0]), d = int.Parse(s[1]); int ans = n / (2 * d + 1); if (n % (2 * d + 1) != 0) ans++; Console.WriteLine(ans); } } // mcs Main.c...
[["+", 0, 212, 0, 16, 12, 23, 0, 16, 17, 72], ["+", 0, 212, 0, 16, 12, 23, 0, 16, 12, 203], ["+", 15, 16, 31, 16, 12, 23, 0, 16, 17, 72], ["+", 15, 16, 31, 16, 12, 23, 0, 16, 12, 203]]
8
103
4
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Text.RegularExpressions; using static System.Console; namespace AtCoder_1 { class Program { static void Main(string[] args) { var a = CinTAr(); double one = a[1] * 2; Cout(Math...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Text.RegularExpressions; using static System.Console; namespace AtCoder_1 { class Program { static void Main(string[] args) { var a = CinTAr(); double one = a[1] * 2 + 1; Cout(...
[["+", 0, 198, 0, 200, 0, 212, 0, 16, 17, 72], ["+", 0, 198, 0, 200, 0, 212, 0, 16, 12, 203]]
8
439
2
using System; using System.Collections; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var A = new List<int>(); for (int i = 0; i < N; i++) { A.Add(int.Parse(Console.ReadLine())); } // 降順ソートする ...
using System; using System.Collections; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var A = new List<int>(); for (int i = 0; i < N; i++) { A.Add(int.Parse(Console.ReadLine())); } // 降順ソートする ...
[["-", 8, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 196, 0, 7, 15, 16, 12, 16, 12, 203], ["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 95]]
8
180
3
using System; using System.Collections; using System.Collections.Generic; using System.Linq; namespace C { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] A = new int[n]; for (int i = 0; i < n; i++) { int a = int.Parse(Console.ReadLine()); A[i] =...
using System; using System.Collections; using System.Collections.Generic; using System.Linq; namespace C { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] A = new int[n]; for (int i = 0; i < n; i++) { int a = int.Parse(Console.ReadLine()); A[i] =...
[["-", 0, 28, 0, 204, 206, 207, 0, 28, 0, 22], ["+", 0, 28, 0, 204, 206, 207, 0, 28, 0, 203]]
8
295
2
using System; using System.Linq; using System.Collections.Generic; using static System.Console; using System.Text; using System.IO; namespace AtCoder_Beginner_Contest_134 { class Program { static public long[] Sarray() { return ReadLine().Split().Select(long.Parse).ToArray(); } static public List<long> Slist...
using System; using System.Linq; using System.Collections.Generic; using static System.Console; using System.Text; using System.IO; namespace AtCoder_Beginner_Contest_134 { class Program { static public long[] Sarray() { return ReadLine().Split().Select(long.Parse).ToArray(); } static public List<long> Slist...
[["-", 12, 213, 3, 4, 0, 28, 0, 204, 205, 22], ["+", 12, 213, 3, 4, 0, 28, 0, 204, 205, 22]]
8
355
2
// C - Exception Handling // 20190912 using System; using System.Linq; using System.Collections.Generic; namespace C { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); var A = new int[N]; for (int i = 0; i < N; i++) { A[i] = int.Parse(Console.ReadLine()); ...
// C - Exception Handling // 20190912 using System; using System.Linq; using System.Collections.Generic; namespace C { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); var A = new int[N]; for (int i = 0; i < N; i++) { A[i] = int.Parse(Console.ReadLine()); ...
[["-", 0, 213, 63, 214, 205, 213, 63, 214, 141, 22], ["+", 0, 213, 63, 214, 205, 213, 63, 214, 141, 22]]
8
170
2
using System; using System.Collections.Generic; using System.IO; using System.Linq; namespace lineAralgebra { class Program { static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var list = new List<int>(); for (int i = 0; i < n; i++) { list.Add(int.Parse(Console.ReadLine()));...
using System; using System.Collections.Generic; using System.IO; using System.Linq; namespace lineAralgebra { class Program { static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var list = new List<int>(); for (int i = 0; i < n; i++) { list.Add(int.Parse(Console.ReadLine()));...
[["-", 0, 204, 206, 207, 0, 28, 0, 16, 12, 203], ["+", 0, 204, 206, 207, 0, 28, 0, 16, 12, 203]]
8
179
2
using System; using System.Collections.Generic; using System.Linq; class Program { static void Main() { var N = int.Parse(Console.ReadLine()); var A = new List<int>(); for (int i = 0; i < N; ++i) A.Add(int.Parse(Console.ReadLine())); var B = new List<int>(A); B.Remove(B.Max()); var max ...
using System; using System.Collections.Generic; using System.Linq; class Program { static void Main() { var N = int.Parse(Console.ReadLine()); var A = new List<int>(); for (int i = 0; i < N; ++i) A.Add(int.Parse(Console.ReadLine())); var B = new List<int>(A); B.Remove(B.Max()); var max ...
[["-", 64, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 64, 196, 0, 7, 15, 16, 12, 16, 12, 203]]
8
307
2
using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AtCoder { public class Prog { const int MOD = 1000000007; public static void Main(string[] args) { var sw = new System.IO.StreamWriter( Console.OpenS...
using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AtCoder { public class Prog { const int MOD = 1000000007; public static void Main(string[] args) { var sw = new System.IO.StreamWriter( Console.OpenS...
[["-", 8, 196, 0, 57, 15, 16, 31, 16, 12, 22], ["+", 8, 196, 0, 57, 15, 16, 31, 16, 12, 22], ["-", 8, 196, 0, 57, 15, 16, 12, 16, 31, 22], ["+", 8, 196, 0, 57, 15, 16, 12, 16, 31, 22], ["-", 0, 57, 64, 196, 0, 1, 0, 11, 12, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 12, 22]]
8
959
6
using System; using System.Collections.Generic; using System.Linq; namespace AtCoder { partial class Program { static void Main(string[] args) { //↓ var s = Console.ReadLine(); var r = new int[s.Length]; var prev = 'L'; var a = 0; var b = 0; var count = 0; var lastR = 0; var f...
using System; using System.Collections.Generic; using System.Linq; namespace AtCoder { partial class Program { static void Main(string[] args) { //↓ var s = Console.ReadLine(); var r = new int[s.Length]; var prev = 'L'; var a = 0; var b = 0; var count = 0; var lastR = 0; var f...
[["-", 15, 16, 31, 16, 31, 23, 0, 16, 31, 22], ["+", 31, 16, 31, 23, 0, 16, 31, 214, 205, 22], ["+", 31, 16, 31, 23, 0, 16, 31, 214, 0, 131], ["+", 31, 16, 31, 23, 0, 16, 31, 214, 141, 22], ["-", 15, 16, 31, 16, 31, 23, 0, 16, 12, 22], ["+", 15, 16, 31, 16, 31, 23, 0, 16, 12, 22], ["-", 0, 195, 8, 196, 0, 57, 15, 16, 1...
8
386
8
using System; using System.Collections.Generic; using System.Text; using System.Linq; namespace Practice { class Program { static void Main(string[] args) { var sw = new System.IO.StreamWriter( Console.OpenStandardOutput()) { AutoFlush = false }; Console.SetOut(sw); Solve(); Console.Out.Flush(...
using System; using System.Collections.Generic; using System.Text; using System.Linq; namespace Practice { class Program { static void Main(string[] args) { var sw = new System.IO.StreamWriter( Console.OpenStandardOutput()) { AutoFlush = false }; Console.SetOut(sw); Solve(); Console.Out.Flush(...
[["-", 8, 196, 0, 57, 75, 57, 15, 16, 17, 47], ["-", 0, 57, 75, 57, 15, 16, 12, 214, 205, 22], ["-", 0, 57, 75, 57, 15, 16, 12, 214, 0, 131], ["-", 0, 57, 75, 57, 15, 16, 12, 214, 141, 22], ["+", 0, 57, 75, 57, 15, 16, 31, 16, 17, 109], ["+", 0, 57, 75, 57, 15, 16, 31, 16, 12, 203], ["+", 8, 196, 0, 57, 75, 57, 15, 16,...
8
2,588
8
using System; using System.Collections.Generic; using System.Linq; using System.IO; using System.Runtime.CompilerServices; using System.Text; using System.Diagnostics; using System.Numerics; using static System.Console; using static System.Convert; using static System.Math; using static Template; using Pi = Pair<int, i...
using System; using System.Collections.Generic; using System.Linq; using System.IO; using System.Runtime.CompilerServices; using System.Text; using System.Diagnostics; using System.Numerics; using static System.Console; using static System.Convert; using static System.Math; using static Template; using Pi = Pair<int, i...
[["-", 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, 227, 39, 224, 39, 199], ["+", 0, 200, 0, 212, 0, 227, 39, 224, 39, 199], ["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203]]
8
1,793
6
using System; using System.Linq; using System.Collections.Generic; using static System.Console; using System.Text; using System.IO; namespace AtCoder_Beginner_Contest_13 { class Program { //配列にする static public long[] Sarray() { return ReadLine().Split().Select(long.Parse).ToArray(); } // Listにする static pu...
using System; using System.Linq; using System.Collections.Generic; using static System.Console; using System.Text; using System.IO; namespace AtCoder_Beginner_Contest_13 { class Program { //配列にする static public long[] Sarray() { return ReadLine().Split().Select(long.Parse).ToArray(); } // Listにする static pu...
[["+", 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, 203], ["+", 8, 196, 0, 1, 0, 213, 3, 4, 0, 25], ["+", 8, 201, 0, 195, 8, 196, 0, 1, 0, 35]]
8
529
5
using System; using System.Collections.Generic; using System.Linq; using static System.Math; namespace CSharp { static class Program { static void Main(string[] args) { long n, k; ReadLong(out n, out k); int[] A = ReadIntArray(); int ans = Solve(A, k); Console.WriteLine(ans); } private stati...
using System; using System.Collections.Generic; using System.Linq; using static System.Math; namespace CSharp { static class Program { static void Main(string[] args) { long n, k; ReadLong(out n, out k); int[] A = ReadIntArray(); int ans = Solve(A, k); Console.WriteLine(ans); } private stati...
[["-", 8, 196, 0, 57, 15, 16, 12, 16, 17, 18], ["+", 8, 196, 0, 57, 15, 16, 12, 16, 17, 19]]
8
883
2
using System; using System.Linq; class F { static void Main() { var n = int.Parse(Console.ReadLine()); var t = new int [n] .Select(_ => Console.ReadLine().Split().Select(int.Parse).ToArray()) .OrderBy(p => p[0]) .Select(p => p[1]) .ToArray(); var yx...
using System; using System.Linq; class F { static void Main() { var n = int.Parse(Console.ReadLine()); var t = new int [n] .Select(_ => Console.ReadLine().Split().Select(int.Parse).ToArray()) .OrderBy(p => p[0]) .Select(p => p[1]) .ToArray(); var yx...
[["-", 0, 1, 0, 213, 3, 4, 0, 28, 0, 22], ["+", 0, 1, 0, 213, 3, 4, 0, 28, 0, 203]]
8
605
2
using System; using System.Collections.Generic; using System.Linq; namespace easy_Atcoder { class Program { static void Main(string[] args) { float[] ab = Array.ConvertAll(Console.ReadLine().Split(), float.Parse); float resf = (ab[0] + ab[1]) / 2; int res = (int)resf; if (res == resf) { Console...
using System; using System.Collections.Generic; using System.Linq; namespace easy_Atcoder { class Program { static void Main(string[] args) { double[] ab = Array.ConvertAll(Console.ReadLine().Split(), double.Parse); double resf = (ab[0] + ab[1]) / 2; int res = (int)resf; if (res == resf) { Cons...
[["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 0, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["+", 0, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
146
6
using System; using System.Collections.Generic; using static System.Math; using System.Linq; using System.Text; class DandA { static void Main(string[] args) { int[] ab = ReadLineIntArray(); int min = Math.Min(ab[0], ab[1]); int max = Math.Max(ab[0], ab[1]); if ((max - min) % 2 == 0) { Console....
using System; using System.Collections.Generic; using static System.Math; using System.Linq; using System.Text; class DandA { static void Main(string[] args) { int[] ab = ReadLineIntArray(); int min = Math.Min(ab[0], ab[1]); int max = Math.Max(ab[0], ab[1]); if ((max - min) % 2 == 0) { Console....
[["+", 0, 16, 12, 23, 0, 16, 31, 23, 0, 24], ["+", 0, 16, 12, 23, 0, 16, 31, 23, 0, 25], ["+", 0, 28, 0, 16, 12, 23, 0, 16, 17, 85], ["+", 0, 28, 0, 16, 12, 23, 0, 16, 12, 203]]
8
1,193
4
using System; using System.Collections.Generic; using System.Linq; namespace ABC135A { class Program { static void Main(string[] args) { Solver solver = new Solver(); solver.Solve(); } } class Solver { public Solver() { Input input = new Input(); var ab = input.ArrayLong(); A = ab[0]; B ...
using System; using System.Collections.Generic; using System.Linq; namespace ABC135A { class Program { static void Main(string[] args) { Solver solver = new Solver(); solver.Solve(); } } class Solver { public Solver() { Input input = new Input(); var ab = input.ArrayLong(); A = ab[0]; B ...
[["-", 0, 195, 8, 196, 0, 57, 15, 16, 17, 60], ["-", 0, 195, 8, 196, 0, 57, 15, 16, 12, 203], ["+", 0, 195, 8, 196, 0, 57, 15, 16, 17, 79], ["+", 0, 195, 8, 196, 0, 57, 15, 16, 12, 203]]
8
507
4
using System; using System.Collections.Generic; using System.Linq; public class AtCoderA { static void Main() { long a; long b; { var line = Console.ReadLine(); var words = line.Split(' '); a = long.Parse(words[0]); b = long.Parse(words[1]); } Console.WriteLine((a + b % 2...
using System; using System.Collections.Generic; using System.Linq; public class AtCoderA { static void Main() { long a; long b; { var line = Console.ReadLine(); var words = line.Split(' '); a = long.Parse(words[0]); b = long.Parse(words[1]); } Console.WriteLine((a + b) % ...
[["+", 0, 41, 15, 16, 31, 16, 31, 23, 0, 25], ["-", 3, 4, 0, 28, 0, 41, 15, 23, 0, 25]]
8
113
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp2 { class Program { static void Main(string[] args) { string[] input = Console.ReadLine().Split(' '); int A = int.Parse(input[0]); int B = int.Parse(input[1]); int ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp2 { class Program { static void Main(string[] args) { string[] input = Console.ReadLine().Split(' '); int A = int.Parse(input[0]); int B = int.Parse(input[1]); int ...
[["+", 0, 213, 3, 4, 0, 28, 0, 16, 17, 85], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 12, 203], ["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
128
4
namespace AtCoder.ABC.A135 { using System; using System.Collections.Generic; using System.Linq; using System.Numerics; using System.IO; using AtCoder.ABC.IO; public class Quest { public object Solve(Parser parser) { long a = parser.Long(); long b = parser.Long(); return (a - b) % ...
namespace AtCoder.ABC.A135 { using System; using System.Collections.Generic; using System.Linq; using System.Numerics; using System.IO; using AtCoder.ABC.IO; public class Quest { public object Solve(Parser parser) { long a = parser.Long(); long b = parser.Long(); return (a - b) % ...
[["-", 205, 23, 0, 16, 31, 213, 63, 214, 205, 22], ["-", 205, 23, 0, 16, 31, 213, 63, 214, 0, 131], ["-", 205, 23, 0, 16, 31, 213, 63, 214, 141, 22], ["-", 31, 213, 3, 4, 0, 28, 0, 16, 17, 33], ["+", 205, 23, 0, 16, 31, 23, 0, 16, 17, 72]]
8
1,010
5
using System; using static System.Math; class Program { static void Main() { string[] input = Console.ReadLine().Split(' '); int a = int.Parse(input[0]); int b = int.Parse(input[1]); int t = a + b; if (t % 2 == 0) { Console.WriteLine("IMPOSSIBLE"); } else { Console.WriteLine(t / 2...
using System; using static System.Math; class Program { static void Main() { string[] input = Console.ReadLine().Split(' '); int a = int.Parse(input[0]); int b = int.Parse(input[1]); int t = a + b; if (t % 2 == 1) { Console.WriteLine("IMPOSSIBLE"); } else { Console.WriteLine(t / 2...
[["-", 0, 195, 8, 196, 0, 57, 15, 16, 12, 203], ["+", 0, 195, 8, 196, 0, 57, 15, 16, 12, 203]]
8
102
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string[] input = Console.ReadLine().Split(' '); int a = int.Parse(input[0]); int b = int.Parse(input[0]); ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string[] input = Console.ReadLine().Split(' '); int a = int.Parse(input[0]); int b = int.Parse(input[1]); ...
[["-", 0, 28, 0, 204, 206, 207, 0, 28, 0, 203], ["+", 0, 28, 0, 204, 206, 207, 0, 28, 0, 203]]
8
155
2
using System; class Program { static void Main(string[] args) { string[] input = Console.ReadLine().Split(' '); int a = int.Parse(input[0]); int b = int.Parse(input[0]); int k1, k2, k3, k4; k1 = (a + b) / 2; k2 = (a - b) / 2; k3 = -(a + b) / 2; k4 = -(a - b) / 2; int ans1 = Math...
using System; class Program { static void Main(string[] args) { string[] input = Console.ReadLine().Split(' '); int a = int.Parse(input[0]); int b = int.Parse(input[1]); int k1, k2, k3, k4; k1 = (a + b) / 2; k2 = (a - b) / 2; k3 = -(a + b) / 2; k4 = -(a - b) / 2; int ans1 = Math...
[["-", 0, 28, 0, 204, 206, 207, 0, 28, 0, 203], ["+", 0, 28, 0, 204, 206, 207, 0, 28, 0, 203]]
8
288
2
using System; class atcoder { public static void Main() { string[] s = Console.ReadLine().Split(' '); int n = int.Parse(s[0]); int m = int.Parse(s[1]); if ((n + m) % 2 == 0) { Console.WriteLine((n + m) / 2); } else { Console.WriteLine("IMPOSSOBLE"); } } }
using System; class atcoder { public static void Main() { string[] s = Console.ReadLine().Split(' '); int n = int.Parse(s[0]); int m = int.Parse(s[1]); if ((n + m) % 2 == 0) { Console.WriteLine((n + m) / 2); } else { Console.WriteLine("IMPOSSIBLE"); } } }
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
98
2
using System; using System.Collections.Generic; using System.Linq; public class Program { static void Main(string[] args) { var array = Console.ReadLine() .Split(' ') .Select(int.Parse) .OrderBy(x => x) .ToArray(); var answer = ...
using System; using System.Collections.Generic; using System.Linq; public class Program { static void Main(string[] args) { var array = Console.ReadLine() .Split(' ') .Select(int.Parse) .OrderBy(x => x) .ToArray(); var answer = ...
[["+", 3, 4, 0, 28, 0, 16, 31, 23, 0, 24], ["+", 0, 28, 0, 16, 31, 23, 0, 16, 17, 85], ["+", 0, 28, 0, 16, 31, 23, 0, 16, 12, 203], ["+", 3, 4, 0, 28, 0, 16, 31, 23, 0, 25]]
8
112
4
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Atc_0033 { class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); List<int> Nums = Console.ReadLine().Split(' ').Select(int.Parse).ToList<in...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Atc_0033 { class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); List<int> Nums = Console.ReadLine().Split(' ').Select(int.Parse).ToList<in...
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
213
4
using System; using System.Collections.Generic; using System.Linq; namespace cswork { class Program { 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 ...
using System; using System.Collections.Generic; using System.Linq; namespace cswork { class Program { 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 ...
[["-", 0, 1, 0, 213, 3, 4, 0, 28, 0, 22], ["+", 0, 1, 0, 213, 3, 4, 0, 28, 0, 22]]
8
734
6
using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; namespace B { public class Program { static void Main(string[] args) { var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false }; Console.SetOut(sw); Solve(); Cons...
using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; namespace B { public class Program { static void Main(string[] args) { var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false }; Console.SetOut(sw); Solve(); Cons...
[["-", 0, 28, 0, 41, 15, 16, 31, 16, 17, 85], ["-", 0, 28, 0, 41, 15, 16, 31, 16, 12, 203], ["-", 3, 4, 0, 28, 0, 41, 15, 16, 17, 18], ["+", 3, 4, 0, 28, 0, 41, 15, 16, 17, 19]]
8
191
4
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AtCoder { class Program { static void Main() { Solve(); Console.ReadKey(); } static void Solve() { var N = IO.GetInt(); var p = IO.GetIntList(); var n = 0; var a...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AtCoder { class Program { static void Main() { Solve(); Console.ReadKey(); } static void Solve() { var N = IO.GetInt(); var p = IO.GetIntList(); var n = 0; var a...
[["-", 8, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 196, 0, 7, 15, 16, 12, 16, 12, 203], ["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 45], ["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 46]]
8
375
4
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; // using ProCon.Util; namespace ProCon { class Program { static void Main(string[] args) { AC135B(); } static void AC135B() { // https://atcoder.jp/contests/abc135/tasks string answer = "Ye...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; // using ProCon.Util; namespace ProCon { class Program { static void Main(string[] args) { AC135B(); } static void AC135B() { // https://atcoder.jp/contests/abc135/tasks string answer = "YE...
[["-", 0, 198, 0, 200, 0, 212, 0, 5, 0, 222], ["+", 0, 198, 0, 200, 0, 212, 0, 5, 0, 222], ["-", 64, 196, 0, 1, 0, 11, 12, 5, 0, 222], ["+", 64, 196, 0, 1, 0, 11, 12, 5, 0, 222]]
8
170
4
using System; using System.Linq; using System.Collections.Generic; namespace Competition { class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var p = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); for (var i = 1; i <= N; i++) { if (i != p[i - 1]) {...
using System; using System.Linq; using System.Collections.Generic; namespace Competition { class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var p = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); for (var i = 1; i <= N; i++) { if (i != p[i - 1]) {...
[["-", 0, 7, 8, 196, 0, 57, 64, 196, 0, 46], ["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 46]]
8
231
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; public class MainClass { public const long Giri = 1000000007; public static void Main(string[] args) { var n = Console.ReadLine().ToInt(); var p = Input().ToInt(); var q = new int[p.Length]; Array.Copy(p, q, n); ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; public class MainClass { public const long Giri = 1000000007; public static void Main(string[] args) { var n = Console.ReadLine().ToInt(); var p = Input().ToInt(); var q = new int[p.Length]; Array.Copy(p, q, n); ...
[["+", 3, 4, 0, 28, 0, 41, 15, 23, 0, 24], ["+", 0, 28, 0, 41, 15, 23, 0, 16, 17, 106], ["+", 0, 41, 15, 23, 0, 16, 12, 16, 31, 22], ["+", 0, 41, 15, 23, 0, 16, 12, 16, 17, 60], ["+", 0, 41, 15, 23, 0, 16, 12, 16, 12, 203], ["+", 3, 4, 0, 28, 0, 41, 15, 23, 0, 25]]
8
375
6
using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { int k = int.Parse(Console.ReadLine()); string[] strarray = Console.ReadLine().Split(' '); int[] array = new int[strarray.Length]; int start = -1; int end = -1; for (int t = ...
using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { int k = int.Parse(Console.ReadLine()); string[] strarray = Console.ReadLine().Split(' '); int[] array = new int[strarray.Length]; int start = -1; int end = -1; for (int t ...
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
356
2
using System; public class Hello { public static void Main() { var n = int.Parse(Console.ReadLine().Trim()); string[] line = Console.ReadLine().Trim().Split(' '); var a = Array.ConvertAll(line, int.Parse); Console.WriteLine(check(a, n) ? "YES" : "NO"); } static bool check(int[] a, int n) { va...
using System; public class Hello { public static void Main() { var n = int.Parse(Console.ReadLine().Trim()); string[] line = Console.ReadLine().Trim().Split(' '); var a = Array.ConvertAll(line, int.Parse); Console.WriteLine(check(a, n) ? "YES" : "NO"); } static bool check(int[] a, int n) { va...
[["-", 8, 196, 0, 57, 15, 16, 31, 16, 17, 72], ["-", 8, 196, 0, 57, 15, 16, 31, 16, 12, 203]]
8
155
2
using System; using System.Linq; namespace ABC135 { class A { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); string[] input = Console.ReadLine().Split(' '); int[] array = new int[N]; for (int i = 0; i < N; i++) { array[i] = int.Parse(input[i]); } int conut = ...
using System; using System.Linq; namespace ABC135 { class A { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); string[] input = Console.ReadLine().Split(' '); int[] array = new int[N]; for (int i = 0; i < N; i++) { array[i] = int.Parse(input[i]); } int conut = ...
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
169
4
using System; using System.Linq; namespace _0or1_Swap { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); int[] p = new int[N]; int[] q = new int[N]; int count = 0; p = Console.ReadLine().Split().Select(int.Parse).ToArray(); for (int i = 0; i < N; i++) ...
using System; using System.Linq; namespace _0or1_Swap { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); int[] p = new int[N]; int[] q = new int[N]; int count = 0; p = Console.ReadLine().Split().Select(int.Parse).ToArray(); for (int i = 0; i < N; i++) ...
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
162
4
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AtCoderPre { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); var p = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse); var coun...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AtCoderPre { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); var p = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse); var coun...
[["-", 3, 4, 0, 28, 0, 41, 64, 5, 0, 222], ["+", 3, 4, 0, 28, 0, 41, 64, 5, 0, 222]]
8
135
2
using System; using System.Linq; namespace ABC135B { class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var p = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray(); var ans = 0; for (var i = 1; i < p.Length; i++) { if (p[i] != i + 1) ans...
using System; using System.Linq; namespace ABC135B { class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var p = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray(); var ans = 0; for (var i = 0; i < p.Length; i++) { if (p[i] != i + 1) ans...
[["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203]]
8
124
2
using System; using System.Linq; namespace Test { class Program { static void Main(string[] args) { var len = int.Parse(Console.ReadLine()); var vec = Console.ReadLine().Split(' ').Select(n => int.Parse(n)).ToList(); var res = vec.ToList(); res.Sort(); int count = 0; for (int i = 0; i < len...
using System; using System.Linq; namespace Test { class Program { static void Main(string[] args) { var len = int.Parse(Console.ReadLine()); var vec = Console.ReadLine().Split(' ').Select(n => int.Parse(n)).ToList(); var res = vec.ToList(); res.Sort(); int count = 0; for (int i = 0; i < len...
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
154
4
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program { static void Main(string[] args) { int N = GetInputInt(); int[] P = GetInputsInt(); int count = 0; for (int i = 0; i < N; i++) { if (i + 1 == P[i]) contin...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program { static void Main(string[] args) { int N = GetInputInt(); int[] P = GetInputsInt(); int count = 0; for (int i = 0; i < N; i++) { if (i + 1 == P[i]) contin...
[["-", 0, 7, 8, 196, 0, 57, 15, 16, 12, 203], ["+", 0, 7, 8, 196, 0, 57, 15, 16, 12, 203]]
8
267
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ClassLibrary1 { public class ListNode { public int val; public ListNode next; public ListNode(int x) { val = x; } } public class Class1 { static List<string> cons = new List<string>();...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ClassLibrary1 { public class ListNode { public int val; public ListNode next; public ListNode(int x) { val = x; } } public class Class1 { static List<string> cons = new List<string>();...
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
389
8
using System; using System.Linq; using static System.Console; class Program { static void Main(string[] args) { int N = int.Parse(ReadLine()); string[] strp = ReadLine().Split(' '); int[] p = strp.Select(int.Parse).ToArray(); int count = 0; for (int i = 0; i < N; i++) { if (p[i] != i + 1) { ...
using System; using System.Linq; using static System.Console; class Program { static void Main(string[] args) { int N = int.Parse(ReadLine()); string[] strp = ReadLine().Split(' '); int[] p = strp.Select(int.Parse).ToArray(); int count = 0; for (int i = 0; i < N; i++) { if (p[i] != i + 1) { ...
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
141
4
using System; using System.Collections.Generic; using System.Text; using System.Numerics; using System.IO; namespace SolutionCS { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); string[] s = Console.ReadLine().Split(' '); int c = 0; for (int i = 0; i < N; i+...
using System; using System.Collections.Generic; using System.Text; using System.Numerics; using System.IO; namespace SolutionCS { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); string[] s = Console.ReadLine().Split(' '); int c = 0; for (int i = 0; i < N; i+...
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
146
4
using System; using System.Linq; namespace ABC { using System.Collections.Generic; using System.Runtime.InteropServices; #if USE_STUB using static Stub.Console; #else using static System.Console; #endif using static System.Math; public class Program { static void Main(string[] args) { WriteLine(Solve()); } static...
using System; using System.Linq; namespace ABC { using System.Collections.Generic; using System.Runtime.InteropServices; #if USE_STUB using static Stub.Console; #else using static System.Console; #endif using static System.Math; public class Program { static void Main(string[] args) { WriteLine(Solve()); } static...
[["-", 0, 195, 8, 196, 0, 57, 15, 16, 12, 203], ["+", 0, 195, 8, 196, 0, 57, 15, 16, 12, 203]]
8
178
2
using System; using static System.Console; using static System.Math; using System.IO; using System.Collections.Generic; namespace I_am_the_green_coder { class Inonoa { static void Main() { long n = ILongs()[0]; long[] p = ILongs(); bool muri_ = false; for (int k = 1; k < n; k++) { if (p[k] <= p[...
using System; using static System.Console; using static System.Math; using System.IO; using System.Collections.Generic; namespace I_am_the_green_coder { class Inonoa { static void Main() { long n = ILongs()[0]; long[] p = ILongs(); bool muri_ = false; for (int k = 1; k < n; k++) { if (p[k] <= p[...
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
565
6
using System; using System.Linq; using System.Collections.Generic; using E = System.Linq.Enumerable; public class Program { public static void Main() { var n = int.Parse(Console.ReadLine()); var ps = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray(); var k = 0; for (int i = 0; i < ps.L...
using System; using System.Linq; using System.Collections.Generic; using E = System.Linq.Enumerable; public class Program { public static void Main() { var n = int.Parse(Console.ReadLine()); var ps = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray(); var k = 0; for (int i = 0; i < ps.L...
[["-", 8, 196, 0, 57, 15, 16, 12, 16, 17, 60], ["+", 8, 196, 0, 57, 15, 16, 12, 16, 17, 79]]
8
158
2
using System; using System.Linq; using System.Collections.Generic; using static System.Console; using System.Text; using System.IO; namespace AtCoder_Beginner_Contest_134 { class Program { static public long[] Sarray() { return ReadLine().Split().Select(long.Parse).ToArray(); } static public List<long> Slist...
using System; using System.Linq; using System.Collections.Generic; using static System.Console; using System.Text; using System.IO; namespace AtCoder_Beginner_Contest_134 { class Program { static public long[] Sarray() { return ReadLine().Split().Select(long.Parse).ToArray(); } static public List<long> Slist...
[["+", 0, 28, 0, 283, 0, 284, 0, 16, 17, 72], ["+", 0, 28, 0, 283, 0, 284, 0, 16, 12, 203]]
8
304
2
using System; using System.Collections.Generic; using System.Linq; using System.IO; using System.Text; using System.Threading.Tasks; using System.Globalization; using System.Collections; namespace Atcoder { public class CPair<T, U> : IComparable where T : IComparable<T> { public readonly T Item1; public readon...
using System; using System.Collections.Generic; using System.Linq; using System.IO; using System.Text; using System.Threading.Tasks; using System.Globalization; using System.Collections; namespace Atcoder { public class CPair<T, U> : IComparable where T : IComparable<T> { public readonly T Item1; public readon...
[["-", 0, 7, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 196, 0, 7, 15, 16, 17, 19]]
8
9,681
2
using System; using System.Text; using System.Collections.Generic; using System.Linq; class Program { static List<int>[] Sub; static int[] Salary; static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var A = Console.ReadLine().Split().Select(a => long.Parse(a)).ToArray(); var B ...
using System; using System.Text; using System.Collections.Generic; using System.Linq; class Program { static List<int>[] Sub; static int[] Salary; static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var A = Console.ReadLine().Split().Select(a => long.Parse(a)).ToArray(); var B ...
[["-", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["+", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203], ["-", 12, 204, 206, 207, 0, 28, 0, 16, 31, 22], ["+", 12, 204, 206, 207, 0, 28, 0, 16, 31, 22], ["-", 0, 57, 64, 196, 0, 1, 0, 22...
8
302
12
using System; using System.Collections.Generic; using System.Linq; using System.Text; using static System.Console; public static class Program { private static readonly long INF = long.MaxValue / 2; private static readonly int MOD = 1000000007; struct Pair<T, U> : IComparable<Pair<T, U>> where T : ICompar...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using static System.Console; public static class Program { private static readonly long INF = long.MaxValue / 2; private static readonly int MOD = 1000000007; struct Pair<T, U> : IComparable<Pair<T, U>> where T : ICompar...
[["-", 0, 57, 64, 196, 0, 1, 0, 11, 12, 203], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 12, 203], ["-", 0, 57, 75, 196, 0, 1, 0, 11, 12, 203], ["+", 0, 57, 75, 196, 0, 1, 0, 11, 12, 203]]
8
1,888
4
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.CompilerServices; using ll = System.Int64; public class Contest { static void Swap1<T>(ref T a, ref T b) { T t = a; a = b; b = t; } static void Swap2<T>(ref T a, ref T b) where T : ICompa...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.CompilerServices; using ll = System.Int64; public class Contest { static void Swap1<T>(ref T a, ref T b) { T t = a; a = b; b = t; } static void Swap2<T>(ref T a, ref T b) where T : ICompa...
[["-", 0, 11, 12, 204, 206, 207, 0, 28, 0, 22], ["+", 0, 11, 12, 204, 206, 207, 0, 28, 0, 22]]
8
2,534
2
using System; using System.Collections.Generic; using System.Linq; namespace debug { public static partial class Program { public static void Main() { var n = Console.ReadLine().ToLong(); var ais = Console.ReadLine().ToLongArray(); var array = new bool[n]; for (var i = n; i > 0; i--) { var sum...
using System; using System.Collections.Generic; using System.Linq; namespace debug { public static partial class Program { public static void Main() { var n = Console.ReadLine().ToLong(); var ais = Console.ReadLine().ToLongArray(); var array = new bool[n]; for (var i = n; i > 0; i--) { var sum...
[["+", 206, 207, 0, 28, 0, 16, 31, 16, 31, 22], ["+", 206, 207, 0, 28, 0, 16, 31, 16, 17, 48], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 62], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
653
5
using System; using System.Linq; class D { static void Main() { var n = int.Parse(Console.ReadLine()); var a = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); var b = new int[n]; var m = n / 2; for (var i = m; i < n; i++) b[i] = a[i]; for (var i = m - 1; i >= 0; i--) b...
using System; using System.Linq; class D { static void Main() { var n = int.Parse(Console.ReadLine()); var a = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); var b = new int[n]; var m = n / 2; for (var i = m; i < n; i++) b[i] = a[i]; for (var i = m - 1; i >= 0; i--) b...
[["-", 3, 4, 0, 28, 0, 218, 8, 204, 205, 22], ["+", 3, 4, 0, 28, 0, 218, 8, 204, 205, 22]]
8
237
2
using System; using System.Text; using System.Linq; class Program { static void Main(string[] args) { String ret; ret = process(new System.IO.StreamReader(Console.OpenStandardInput())); // ret = process("5\n0 0 0 0 0"); Console.WriteLine(ret); // Console.ReadLine(); } static string process(...
using System; using System.Text; using System.Linq; class Program { static void Main(string[] args) { String ret; ret = process(new System.IO.StreamReader(Console.OpenStandardInput())); // ret = process("3\n1 0 0"); Console.WriteLine(ret); // Console.ReadLine(); } static string process(Syst...
[["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203]]
8
389
2
using System; using System.Collections.Generic; using System.Text; using System.Numerics; using System.IO; namespace SolutionCS { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); int[] v = new int[N]; int M = 0; string[] s = Console.ReadLine().Split(' '); ...
using System; using System.Collections.Generic; using System.Text; using System.Numerics; using System.IO; namespace SolutionCS { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); int[] v = new int[N]; int M = 0; string[] s = Console.ReadLine().Split(' '); ...
[["-", 64, 196, 0, 1, 0, 11, 0, 202, 0, 32], ["-", 64, 196, 0, 1, 0, 11, 12, 16, 31, 22], ["-", 64, 196, 0, 1, 0, 11, 12, 16, 17, 72], ["-", 64, 196, 0, 1, 0, 11, 12, 16, 12, 203], ["+", 0, 57, 64, 196, 0, 1, 0, 223, 0, 29]]
8
329
5
using System; namespace AtCoderABC134D { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); string[] s = Console.ReadLine().Split(' '); int[] a = new int[N + 1]; int[] b = new int[N + 1]; for (int i = 0; i < N; i++) { a[i + 1] = int.Parse(s[i]); ...
using System; namespace AtCoderABC134D { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); string[] s = Console.ReadLine().Split(' '); int[] a = new int[N + 1]; int[] b = new int[N + 1]; for (int i = 0; i < N; i++) { a[i + 1] = int.Parse(s[i]); ...
[["-", 0, 7, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 196, 0, 7, 15, 16, 17, 19]]
8
285
2
using System; using System.Linq; namespace abc134_d { static class Program { static void Main(string[] args) { var n = Console.ReadLine().ToInteger(); var a = Console.ReadLine().ToIntArray(); // 偶数か奇数かなので、ボールを1つ入れるか入れないかだけを考えればいい。 var boxes = new int[n]; for (int i = 0; i < a.Length; i++) { ...
using System; using System.Linq; namespace abc134_d { static class Program { static void Main(string[] args) { var n = Console.ReadLine().ToInteger(); var a = Console.ReadLine().ToIntArray(); // 偶数か奇数かなので、ボールを1つ入れるか入れないかだけを考えればいい。 var boxes = new int[n]; for (int i = 0; i < a.Length; i++) { ...
[["-", 0, 28, 0, 218, 8, 41, 64, 5, 0, 62], ["-", 3, 4, 0, 28, 0, 218, 8, 41, 0, 102], ["+", 8, 41, 64, 213, 63, 214, 205, 23, 0, 24], ["+", 64, 213, 63, 214, 205, 23, 0, 16, 17, 72], ["+", 64, 213, 63, 214, 205, 23, 0, 16, 12, 203], ["+", 8, 41, 64, 213, 63, 214, 205, 23, 0, 25], ["+", 3, 4, 0, 28, 0, 218, 8, 41, 0, 1...
8
317
10
using System; using System.Collections.Generic; public class ABC134D { public static void Main() { int N, M = 0, sum = 0; string ans = ""; List<int> a = new List<int>(), b = new List<int>(); N = int.Parse(Console.ReadLine()); string[] str = Console.ReadLine().Split(' '); for (int i = 0; i < N;...
using System; using System.Collections.Generic; public class ABC134D { public static void Main() { int N, M = 0, sum = 0; string ans = ""; List<int> a = new List<int>(), b = new List<int>(); N = int.Parse(Console.ReadLine()); string[] str = Console.ReadLine().Split(' '); for (int i = 0; i < N;...
[["+", 0, 213, 3, 4, 0, 28, 0, 16, 17, 72], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 12, 203]]
8
275
2
using System; using System.Linq; using System.Collections.Generic; class Program { static int N; static void Main() { N = Int32.Parse(Console.ReadLine()); var a = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).ToArray(); var ball = new int[N]; for (int i = N - 1; 0 <= i; --i) { va...
using System; using System.Linq; using System.Collections.Generic; class Program { static int N; static void Main() { N = Int32.Parse(Console.ReadLine()); var a = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).ToArray(); var ball = new int[N]; for (int i = N - 1; 0 <= i; --i) { va...
[["-", 0, 195, 8, 196, 0, 1, 0, 11, 31, 22], ["+", 8, 196, 0, 197, 0, 198, 39, 216, 0, 217], ["+", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["-", 0, 200, 0, 212, 0, 213, 63, 214, 205, 22], ["+", 0, 200, 0, 212, 0, 213, 63, 214, 205, 22]]
8
319
5
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading; using Extensions; using static System.Math; using static Extensions.MathExtension; using static Extensions.ConsoleInputExtension; using static Extensions.ConsoleOutputExtension; class Solver {...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading; using Extensions; using static System.Math; using static Extensions.MathExtension; using static Extensions.ConsoleInputExtension; using static Extensions.ConsoleOutputExtension; class Solver {...
[["-", 0, 7, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 196, 0, 7, 15, 16, 17, 19]]
8
2,347
2
using System; using System.Collections.Generic; namespace D___Preparing_Boxes { class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var read = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse); var ai = new int[N + 1]; for (int i = 1; i < N + 1; i++) ...
using System; using System.Collections.Generic; namespace D___Preparing_Boxes { class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var read = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse); var ai = new int[N + 1]; for (int i = 1; i < N + 1; i++) ...
[["-", 0, 7, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 196, 0, 7, 15, 16, 17, 19]]
8
235
2
using System; using System.Collections.Generic; using System.Linq; using static System.Console; using static System.Math; class MainClass : Scanner { static void Main() { int N = RInt(); var A = new long[N]; for (int i = 0; i < N; i++) { A[i] = RLong(); } var dp = new List<long>() { A[0] }...
using System; using System.Collections.Generic; using System.Linq; using static System.Console; using static System.Math; class MainClass : Scanner { static void Main() { int N = RInt(); var A = new long[N]; for (int i = 0; i < N; i++) { A[i] = RLong(); } var dp = new List<long>() { A[0] }...
[["-", 0, 52, 8, 196, 0, 57, 15, 16, 17, 47], ["+", 0, 52, 8, 196, 0, 57, 15, 16, 17, 20]]
8
840
2
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.IO; using static System.Console; using static System.Math; public class Ans { static public int mod = 1000000007; static public string al = "abcdefghijklmnopqrstuvwxyz"; public static void Main() { // 方針...
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.IO; using static System.Console; using static System.Math; public class Ans { static public int mod = 1000000007; static public string al = "abcdefghijklmnopqrstuvwxyz"; public static void Main() { // 方針...
[["-", 0, 52, 8, 196, 0, 57, 15, 16, 17, 47], ["+", 0, 52, 8, 196, 0, 57, 15, 16, 17, 20]]
8
1,234
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AtCorder { public class Program { const long MOD = 1000000007; static void Main(string[] args) { Scanner cin = new Scanner(); int n = cin.Int(); int[] a = new int[n]; for (i...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AtCorder { public class Program { const long MOD = 1000000007; static void Main(string[] args) { Scanner cin = new Scanner(); int n = cin.Int(); int[] a = new int[n]; for (i...
[["-", 0, 52, 8, 196, 0, 57, 15, 16, 17, 20], ["+", 0, 52, 8, 196, 0, 57, 15, 16, 17, 47]]
8
820
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AtCoder { class Program { static void Main(string[] args) { long N = long.Parse(Console.ReadLine()); long[] A = new long[N]; for (long i = 0; i < N; i++) { A[i] = long.Parse...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AtCoder { class Program { static void Main(string[] args) { long N = long.Parse(Console.ReadLine()); long[] A = new long[N]; for (long i = 0; i < N; i++) { A[i] = long.Parse...
[["-", 0, 52, 8, 196, 0, 57, 15, 16, 17, 19], ["+", 0, 52, 8, 196, 0, 57, 15, 16, 17, 47]]
8
297
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Collections; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { long n = int.Parse(Console.ReadLine()); long[] a = new long[n]; List<long> colo...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Collections; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { long n = int.Parse(Console.ReadLine()); long[] a = new long[n]; List<long> colo...
[["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 203], ["-", 8, 201, 0, 235, 8, 201, 0, 195, 8, 196], ["-", 0, 235, 8, 201, 0, 195, 8, 196, 0, 197], ["-", 8, 201, 0, 195, 8, 196, 0, 197, 0, 198], ["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["-", 8, 196, 0, 197, 0, 198, 39, 199, ...
8
311
3
using System; using System.Collections.Generic; namespace abc134_e { static class Program { static void Main(string[] args) { var n = Console.ReadLine().ToInteger(); var a = new int[n]; for (int i = 0; i < a.Length; i++) { a[i] = Console.ReadLine().ToInteger(); } // 各色の最大値(最後の値)を小さい順に入れて置く...
using System; using System.Collections.Generic; namespace abc134_e { static class Program { static void Main(string[] args) { var n = Console.ReadLine().ToInteger(); var a = new int[n]; for (int i = 0; i < a.Length; i++) { a[i] = Console.ReadLine().ToInteger(); } // 各色の最大値(最後の値)を小さい順に入れて置く...
[["-", 64, 196, 0, 1, 0, 11, 0, 202, 0, 32], ["-", 64, 196, 0, 1, 0, 11, 12, 241, 0, 33], ["+", 64, 196, 0, 1, 0, 11, 0, 202, 0, 110]]
8
508
3
using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { var N = sc.ReadInt(); var A = sc.ReadIntArray(N); var g = A.GroupBy(a => a); var count = g.Count(); var ok = false; if (count == 1) { ok = A.All(x => x == 0); } else ...
using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { var N = sc.ReadInt(); var A = sc.ReadIntArray(N); var g = A.GroupBy(a => a); var count = g.Count(); var ok = false; if (count == 1) { ok = A.All(x => x == 0); } else ...
[["-", 0, 16, 12, 204, 206, 207, 0, 28, 0, 203], ["+", 0, 16, 12, 204, 206, 207, 0, 28, 0, 203]]
8
760
2
using System; using System.Collections.Generic; using System.Text; using System.Numerics; using System.IO; namespace SolutionCS { class Program { class CountedHashSet { public class Counter { public Counter() { count = 1; } public int count { get; set; } } public Dictionary<int, Counter> ke...
using System; using System.Collections.Generic; using System.Text; using System.Numerics; using System.IO; namespace SolutionCS { class Program { class CountedHashSet { public class Counter { public Counter() { count = 1; } public int count { get; set; } } public Dictionary<int, Counter> ke...
[["-", 0, 57, 64, 196, 0, 57, 15, 16, 17, 18], ["+", 64, 196, 0, 57, 15, 16, 31, 16, 17, 48], ["+", 64, 196, 0, 57, 15, 16, 31, 16, 12, 203], ["+", 0, 57, 64, 196, 0, 57, 15, 16, 17, 79], ["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
545
8
using System; using System.Collections.Generic; using System.Linq; class Program { static Scanner sc = new Scanner(); static void Main(string[] args) { var N = sc.ReadInt(); var A = sc.ReadInt(); var B = sc.ReadInt(); var ans = N * Math.Min(A, B); Console.WriteLine(ans); } static long Gcd...
using System; using System.Collections.Generic; using System.Linq; class Program { static Scanner sc = new Scanner(); static void Main(string[] args) { var N = sc.ReadInt(); var A = sc.ReadInt(); var B = sc.ReadInt(); var ans = Math.Min(N * A, B); Console.WriteLine(ans); } static long Gcd...
[["-", 0, 198, 0, 200, 0, 212, 0, 16, 31, 22], ["-", 0, 198, 0, 200, 0, 212, 0, 16, 17, 48], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 31, 22], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 17, 48]]
8
707
4
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { class Program { static void Main(string[] args) { var NAB = Array.ConvertAll(Console.ReadLine().Split(), int.Parse); var N = NAB[0]; var A = NAB[1]; var B = NAB...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { class Program { static void Main(string[] args) { var NAB = Array.ConvertAll(Console.ReadLine().Split(), int.Parse); var N = NAB[0]; var A = NAB[1]; var B = NAB...
[["-", 0, 200, 0, 212, 0, 213, 63, 214, 141, 22], ["+", 0, 200, 0, 212, 0, 213, 63, 214, 141, 22]]
8
113
2
using System; using System.Linq; namespace atcoder { class Program { static void Main(string[] args) { A.TorT(); } } class A { public static void TorT() { int[] num = Input.getIntArray(); int train = num[0] * num[1]; if (train > num[1]) { Output.writeInt(num[2]); } else { Output.writeI...
using System; using System.Linq; namespace atcoder { class Program { static void Main(string[] args) { A.TorT(); } } class A { public static void TorT() { int[] num = Input.getIntArray(); int train = num[0] * num[1]; if (train > num[2]) { Output.writeInt(num[2]); } else { Output.writeI...
[["-", 15, 16, 12, 204, 206, 207, 0, 28, 0, 203], ["+", 15, 16, 12, 204, 206, 207, 0, 28, 0, 203]]
8
224
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ABC132 { class Program { static void Main(string[] args) { string Str = Console.ReadLine().Trim(); int n = int.Parse(Str); Str = Console.ReadLine().Trim(); string[] StrArr =...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ABC132 { class Program { static void Main(string[] args) { string Str = Console.ReadLine().Trim(); int n = int.Parse(Str); Str = Console.ReadLine().Trim(); string[] StrArr =...
[["-", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["-", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["-", 0, 28, 0, 218, 54, 219, 0, 220, 141, 22], ["-", 0, 213, 3, 4, 0, 28, 0, 218, 0, 221], ["-", 0, 213, 3, 4, 0, 28, 0, 218, 8, 2...
8
189
8
using System; using System.Linq; using System.Collections.Generic; namespace Algorithm { class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var array = Console.ReadLine().Split().Select(int.Parse).ToArray(); var max = array.Max(); Array.Sort(array); var cent...
using System; using System.Linq; using System.Collections.Generic; namespace Algorithm { class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var array = Console.ReadLine().Split().Select(int.Parse).ToArray(); var max = array.Max(); Array.Sort(array); var cent...
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
8
146
2
using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { var input = Console.ReadLine().Split(' '); var n = long.Parse(input[0]); var blue = long.Parse(input[1]); var red = n - blue; var list = new List<long>(); for (long i = 1; i ...
using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { var input = Console.ReadLine().Split(' '); var n = long.Parse(input[0]); var blue = long.Parse(input[1]); var red = n - blue; var list = new List<long>(); for (long i = 1; i ...
[["+", 64, 196, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 64, 196, 0, 1, 0, 11, 12, 16, 12, 203]]
8
387
2
using System; using System.Linq; namespace ABC132 { class D2 { static long[,] c; static void Main(string[] args) { // input var nk = Console.ReadLine().Split().Select(long.Parse).ToArray(); var n = nk[0]; var k = nk[1]; var mod = 1000000007; //パスカルの三角形 var c = init(4005); // for i: ...
using System; using System.Linq; namespace ABC132 { class D2 { static long[,] c; static void Main(string[] args) { // input var nk = Console.ReadLine().Split().Select(long.Parse).ToArray(); var n = nk[0]; var k = nk[1]; var mod = 1000000007; init(4005); // for i: 0 - k // n-k_C_i * ...
[["-", 8, 196, 0, 197, 0, 198, 39, 216, 0, 217], ["-", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 32], ["-", 0, 57, 64, 1, 0, 213, 63, 214, 141, 22], ["+", 0, 57, 64, 1, 0, 213, 63, 214, 141, 22]]
8
302
5
using System; using System.Collections.Generic; using System.Linq; using System.Text; public class AtCoderD { private static int n; private static List<Tuple<int, long>>[] to; private static long[] d; static void Main() { int n; int k; { var line = Console.ReadLine(); var words = line....
using System; using System.Collections.Generic; using System.Linq; using System.Text; public class AtCoderD { private static int n; private static List<Tuple<int, long>>[] to; private static long[] d; static void Main() { int n; int k; { var line = Console.ReadLine(); var words = line....
[["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 22], ["+", 0, 197, 0, 198, 0, 200, 0, 212, 0, 22]]
8
585
2
using System; using System.Collections.Generic; using System.Collections; using System.Collections.Specialized; using System.Linq; using System.Text; using System.IO; using System.Reflection; using static System.Math; using System.Numerics; static class Program { const int mod = (int)1e9 + 7; static void Main() { ...
using System; using System.Collections.Generic; using System.Collections; using System.Collections.Specialized; using System.Linq; using System.Text; using System.IO; using System.Reflection; using static System.Math; using System.Numerics; static class Program { const int mod = (int)1e9 + 7; static void Main() { ...
[["+", 3, 4, 0, 28, 0, 16, 31, 23, 0, 24], ["+", 75, 213, 3, 4, 0, 28, 0, 23, 0, 25], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 17, 109], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 12, 22]]
8
1,940
4
using System; using System.Collections.Generic; using System.Collections; using System.Collections.Specialized; using System.Linq; using System.Text; using System.IO; using System.Reflection; using static System.Math; using System.Numerics; static class Program { const int mod = (int)1e9 + 7; static void Main() { ...
using System; using System.Collections.Generic; using System.Collections; using System.Collections.Specialized; using System.Linq; using System.Text; using System.IO; using System.Reflection; using static System.Math; using System.Numerics; static class Program { const int mod = (int)1e9 + 7; static void Main() { ...
[["+", 0, 230, 3, 4, 0, 28, 0, 16, 17, 72], ["+", 0, 230, 3, 4, 0, 28, 0, 16, 12, 203]]
8
1,291
2
using System; using System.Diagnostics; using System.IO; using System.Text; using System.Linq; using System.Collections.Generic; class Program { static void Main(string[] args) { #if DEBUG MyDebugger.Test(process, "../TextFile1.txt"); // MyDebugger.Test(process, "../TextFile2.txt"); // MyDebugger.MakeTes...
using System; using System.Diagnostics; using System.IO; using System.Text; using System.Linq; using System.Collections.Generic; class Program { static void Main(string[] args) { #if DEBUG MyDebugger.Test(process, "../TextFile1.txt"); // MyDebugger.Test(process, "../TextFile2.txt"); // MyDebugger.MakeTes...
[["+", 0, 195, 8, 196, 0, 37, 0, 16, 17, 109], ["+", 0, 195, 8, 196, 0, 37, 0, 16, 12, 22]]
8
461
2
using System; class Program { const int MOD = 1000000007; static int[,] c; static void Main(string[] args) { initc(); var nk = Console.ReadLine().Split(); var n = int.Parse(nk[0]); var k = int.Parse(nk[1]); for (int i = 1; i <= k; i++) { var red = 0; red += f(n - k, i - 1); ...
using System; class Program { const int MOD = 1000000007; static long[,] c; static void Main(string[] args) { initc(); var nk = Console.ReadLine().Split(); var n = int.Parse(nk[0]); var k = int.Parse(nk[1]); for (int i = 1; i <= k; i++) { var red = 0L; red += f(n - k, i - 1); ...
[["-", 8, 201, 0, 124, 0, 198, 39, 224, 39, 199], ["+", 8, 201, 0, 124, 0, 198, 39, 224, 39, 199], ["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203], ["-", 0, 1, 0, 11, 12, 227, 39, 224, 39, 199], ["+", 0, 1, 0, 11, 12, 227, 39, 224, 39, 199], ["-", 0, 208, 0, 235, 8, 201, 0, ...
8
397
12
using System; class Program { static void Main() { string[] input = Console.ReadLine().Split(' '); int N = int.Parse(input[0]); int K = int.Parse(input[1]); const long mod = 1000000007; long[,] C = new long[N, N]; C[0, 0] = 1; int Cmax = Math.Max(K - 1, N - K + 1); for (int i = 1; i ...
using System; class Program { static void Main() { string[] input = Console.ReadLine().Split(' '); int N = int.Parse(input[0]); int K = int.Parse(input[1]); const long mod = 1000000007; long[,] C = new long[N + 1, N + 1]; C[0, 0] = 1; int Cmax = Math.Max(K - 1, N - K + 1); for (int i...
[["+", 0, 227, 39, 224, 225, 226, 0, 16, 17, 72], ["+", 0, 227, 39, 224, 225, 226, 0, 16, 12, 203]]
8
265
4
using System; using System.Linq; using System.Collections.Generic; class Program { private const int mod = 1000000007; //パスカルの三角形 static long[,] pascalsTriangle = new long[4005, 4005]; static void Main() { var nk = Console.ReadLine().Split(' ').Select(x => Int64.Parse(x)).ToArray(); var N = n...
using System; using System.Linq; using System.Collections.Generic; class Program { private const int mod = 1000000007; //パスカルの三角形 static long[,] pascalsTriangle = new long[4005, 4005]; static void Main() { var nk = Console.ReadLine().Split(' ').Select(x => Int64.Parse(x)).ToArray(); var N = n...
[["+", 3, 4, 0, 28, 0, 16, 31, 23, 0, 24], ["+", 3, 4, 0, 28, 0, 16, 31, 23, 0, 25], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 17, 109], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 12, 22]]
8
398
4
using static System.Console; public class Hello { const long p = 1000000007; static string l = ReadLine(); static readonly long N = long.Parse(l.Split()[0]); static readonly long K = long.Parse(l.Split()[1]); public static void Main() { long[,] Comb = new long[N, K + 1]; // nCm = n-1Cm-1 + n-1Cm fo...
using static System.Console; public class Hello { const long p = 1000000007; static string l = ReadLine(); static readonly long N = long.Parse(l.Split()[0]); static readonly long K = long.Parse(l.Split()[1]); public static void Main() { long[,] Comb = new long[N + 1, K + 1]; // nCm = n-1Cm-1 + n-1Cm ...
[["+", 0, 227, 39, 224, 225, 226, 0, 16, 17, 72], ["+", 0, 227, 39, 224, 225, 226, 0, 16, 12, 203], ["+", 8, 196, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 196, 0, 7, 15, 16, 12, 16, 12, 203]]
8
229
4