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.Linq;
class Program {
static void Main() {
int[] nm =
Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
int[] l = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
if (nm[1] == 1) {
Console.Write("0");
return;
}
int[]... | using System;
using System.Linq;
class Program {
static void Main() {
int[] nm =
Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
int[] l = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
if (nm[0] >= nm[1]) {
Console.Write("0");
return;
}
i... | [["-", 15, 16, 31, 204, 206, 207, 0, 28, 0, 203], ["+", 15, 16, 31, 204, 206, 207, 0, 28, 0, 203], ["-", 0, 195, 8, 196, 0, 57, 15, 16, 17, 60], ["+", 0, 195, 8, 196, 0, 57, 15, 16, 17, 20], ["+", 8, 196, 0, 57, 15, 16, 12, 204, 205, 22], ["+", 0, 57, 15, 16, 12, 204, 206, 207, 0, 70], ["+", 0, 57, 15, 16, 12, 204, 206... | 8 | 235 | 7 |
using System;
using System.Linq;
using System.Collections.Generic;
class Program {
static void Main() {
var input1 =
Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList();
var N = input1[0];
var M = input1[1];
var points =
Console.ReadLine().Split(' ').Select(x => int.Parse(... | using System;
using System.Linq;
using System.Collections.Generic;
class Program {
static void Main() {
var input1 =
Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList();
var N = input1[0];
var M = input1[1];
var points =
Console.ReadLine().Split(' ').Select(x => int.Parse(... | [["+", 8, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 196, 0, 7, 15, 16, 12, 16, 12, 203], ["-", 8, 201, 0, 195, 8, 196, 0, 7, 0, 25], ["-", 0, 195, 8, 196, 0, 7, 8, 196, 0, 45], ["-", 8, 196, 0, 7, 8, 196, 0, 57, 0, 121], ["-", 8, 196, 0, 7, 8, 196, 0, 57, 0, 24], ["-", 0, 7, 8, 196, 0, 57, 15, 16, 31, 22], ["-", 0, ... | 8 | 307 | 28 |
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Collections;
namespace AtCoder {
class Program {
static void Main(string[] args) {
var ir = new Resolver(new ConsoleReader());
Console.WriteLine(ir.Resolve());
}
}
public class Resolver {
... | using System;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Collections;
namespace AtCoder {
class Program {
static void Main(string[] args) {
var ir = new Resolver(new ConsoleReader());
Console.WriteLine(ir.Resolve());
}
}
public class Resolver {
... | [["+", 8, 201, 0, 195, 8, 196, 0, 57, 0, 121], ["+", 8, 201, 0, 195, 8, 196, 0, 57, 0, 24], ["+", 8, 196, 0, 57, 15, 16, 31, 204, 205, 22], ["+", 0, 57, 15, 16, 31, 204, 206, 207, 0, 70], ["+", 15, 16, 31, 204, 206, 207, 0, 28, 0, 203], ["+", 0, 57, 15, 16, 31, 204, 206, 207, 0, 73], ["+", 0, 195, 8, 196, 0, 57, 15, 16... | 8 | 350 | 17 |
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 m = int.Parse(line[1]);
if (m == 1) {
Console.WriteLine(0);
goto exit;
}
line = Console.ReadLine().Trim().Split('... | 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 m = int.Parse(line[1]);
if (m == 1) {
Console.WriteLine(0);
goto exit;
}
if (n >= m) {
Console.WriteLine(0)... | [["+", 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, 20], ["+", 0, 195, 8, 196, 0, 57, 15, 16, 12, 22], ["+", 8, 201, 0, 195, 8, 196, 0, 57, 0, 25], ["+", 0, 195, 8, 196, 0, 57, 64, 196, 0, 45],... | 8 | 239 | 18 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AtCorder {
public class Program {
static void Main(string[] args) {
List<long> nm = Console.ReadLine().Split(' ').Select(long.Parse).ToList();
long n = nm[0];
long k = nm[1];
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AtCorder {
public class Program {
static void Main(string[] args) {
List<long> nm = Console.ReadLine().Split(' ').Select(long.Parse).ToList();
long n = nm[0];
long k = nm[1];
... | [["-", 0, 1, 0, 11, 12, 16, 12, 241, 0, 92], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 31, 22], ["+", 8, 196, 0, 1, 0, 11, 0, 202, 0, 32], ["+", 0, 1, 0, 11, 12, 213, 63, 214, 205, 22], ["+", 0, 1, 0, 11, 12, 213, 63, 214, 0, 131], ["+", 0, 1, 0, 11, 12, 213, 63, 214, 141, 22], ["+", 0, 1, 0, 11, 12, 213, 3, 4, 0, 24], ["+", 0,... | 8 | 342 | 13 |
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... | [["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 200, 0, 212, 0, 204, 205, 204, 205, 22], ["+", 0, 212, 0, 204, 205, 204, 206, 207, 0, 70], ["+", 0, 204, 205, 204, 206, 207, 0, 28, 0, 203], ["+", 0, 212, 0, 204, 205, 204, 206, 207, 0, 73], ["+", 0, 200, 0, 212, 0, 204, 206, 207, 0, 70], ["+", 0, 212, 0, 204, 20... | 8 | 1,867 | 44 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using static kyoupuro.Input;
using static kyoupuro.MyMath;
using static kyoupuro.Modular;
namespace kyoupuro {
class MainClass {
public static void Main() {
long N = NextLong, K = NextLong;
var A = Long... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using static kyoupuro.Input;
using static kyoupuro.MyMath;
using static kyoupuro.Modular;
namespace kyoupuro {
class MainClass {
public static void Main() {
long N = NextLong, K = NextLong;
var A = Long... | [["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203], ["-", 8, 201, 0, 195, 8, 196, 0, 197, 0, 35], ["-", 8, 201, 0, 195, 8, 196, 0, 7, 0, 88], ["-", 0, 195, 8, 196, 0, 7, 10, 198, 39, 199], ["-", 8, 196, 0, 7, 10, 198, 0, 200, 141, 22], ["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 32], ["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203... | 8 | 1,485 | 44 |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace AtCoder {
public class ABC {
static int mod = 1000000007; // 10^9+7
static void Main(string[] args) {
Console.SetOut(
new StreamWriter(Console.OpenStan... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace AtCoder {
public class ABC {
static int mod = 1000000007; // 10^9+7
static void Main(string[] args) {
Console.SetOut(
new StreamWriter(Console.OpenStan... | [["-", 0, 213, 63, 214, 205, 214, 205, 214, 205, 22], ["-", 0, 213, 63, 214, 205, 214, 205, 214, 0, 131], ["-", 0, 213, 63, 214, 205, 214, 205, 214, 141, 22], ["-", 0, 1, 0, 213, 63, 214, 205, 214, 0, 131], ["-", 0, 1, 0, 213, 63, 214, 205, 214, 141, 22], ["-", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["-", 8, 196, 0, 1... | 8 | 342 | 33 |
using System;
using System.Collections.Generic;
class Program {
static void Main(string[] args) {
string[] str = Console.ReadLine().Split();
int N = int.Parse(str[0]);
int M = int.Parse(str[1]);
int[] A = new int[M];
string[] str2 = Console.ReadLine().Split();
for (var i = 0; i < M; i++) {
... | using System;
using System.Collections.Generic;
class Program {
static void Main(string[] args) {
string[] str = Console.ReadLine().Split();
int N = int.Parse(str[0]);
int M = int.Parse(str[1]);
int[] A = new int[M];
string[] str2 = Console.ReadLine().Split();
for (var i = 0; i < M; i++) {
... | [["+", 0, 57, 15, 16, 31, 16, 31, 204, 205, 22], ["+", 15, 16, 31, 16, 31, 204, 206, 207, 0, 70], ["+", 31, 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], ["+", 15, 16, 31, 16, 31, 20... | 8 | 940 | 13 |
using System;
namespace AtCoderBeginnerContest118_4 {
class Program {
public static int[] act = null;
static void Main(string[] args) {
string[] s = Console.ReadLine().Split(' ');
int N = int.Parse(s[0]);
int M = int.Parse(s[1]);
s = Console.ReadLine().Split(' ');
bool[] number = new bool[6... | using System;
namespace AtCoderBeginnerContest118_4 {
class Program {
public static int[] act = null;
static void Main(string[] args) {
string[] s = Console.ReadLine().Split(' ');
int N = int.Parse(s[0]);
int M = int.Parse(s[1]);
s = Console.ReadLine().Split(' ');
bool[] number = new bool[6... | [["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 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, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131]] | 8 | 748 | 7 |
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using Cons = System.Console;
class PriorityQueue<T> {
private readonly List<T> m_list;
private readonly Func<T, T, int> m_compare;
private int m_count;
public PriorityQueue(int capacity, Func<T, T, int> compare) {
m_list =... | using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using Cons = System.Console;
class PriorityQueue<T> {
private readonly List<T> m_list;
private readonly Func<T, T, int> m_compare;
private int m_count;
public PriorityQueue(int capacity, Func<T, T, int> compare) {
m_list =... | [["-", 0, 208, 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, 216], ["-", 8, 196, 0, 197, 0, 198, 39, 216, 0, 200], ["-", 0, 197, 0, 198, 39, 216, 0, 200, 0, 1], ["-", 0, 198, 39, 216, 0, 200, 0, 1,... | 8 | 532 | 14 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
using static System.Math;
namespace atcoder {
class Program {
static void Main(string[] args) {
new Program().Solve(new ConsoleInput(Console.In, ' '));
}
public vo... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
using static System.Math;
namespace atcoder {
class Program {
static void Main(string[] args) {
new Program().Solve(new ConsoleInput(Console.In, ' '));
}
public vo... | [["-", 8, 201, 0, 195, 8, 196, 0, 57, 0, 121], ["+", 0, 195, 8, 196, 0, 1, 0, 213, 63, 22], ["-", 0, 195, 8, 196, 0, 57, 15, 16, 17, 18], ["+", 3, 4, 0, 28, 0, 41, 15, 16, 17, 20], ["-", 8, 201, 0, 195, 8, 196, 0, 57, 0, 25], ["-", 8, 196, 0, 57, 64, 1, 0, 213, 63, 22], ["-", 0, 57, 64, 1, 0, 213, 3, 4, 0, 24], ["+", 0... | 8 | 466 | 14 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApp1 {
class Program {
static void Main(string[] args) {
var input =
Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
if (input[1] == 0 || input[1] == 1) {
Console.WriteLine(... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApp1 {
class Program {
static void Main(string[] args) {
var input =
Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
if (input[1] == 1) {
Console.WriteLine("YES");
} els... | [["-", 8, 196, 0, 57, 15, 16, 31, 16, 12, 203], ["-", 0, 195, 8, 196, 0, 57, 15, 16, 17, 106], ["-", 0, 57, 15, 16, 12, 16, 31, 204, 205, 22], ["-", 15, 16, 12, 16, 31, 204, 206, 207, 0, 70], ["-", 15, 16, 12, 16, 31, 204, 206, 207, 0, 73], ["-", 8, 196, 0, 57, 15, 16, 12, 16, 17, 60], ["-", 8, 196, 0, 57, 15, 16, 12, ... | 8 | 140 | 9 |
using System;
using System.Diagnostics;
using System.IO;
namespace AtCoder.MinPuro2019 {
class A {
static void Main() => CustomMain();
static void Solve() {
int n, k;
ReadMulti(out n, out k);
WriteAnswer(k <= n / 2 ? "YES" : "NO");
}
static void CustomMain() {
#if DEBUG
// フ... | using System;
using System.Diagnostics;
using System.IO;
namespace AtCoder.MinPuro2019 {
class A {
static void Main() => CustomMain();
static void Solve() {
int n, k;
ReadMulti(out n, out k);
if (n % 2 == 1) {
WriteAnswer(k <= n / 2 + 1 ? "YES" : "NO");
} else {
Write... | [["+", 8, 201, 0, 195, 8, 196, 0, 57, 0, 121], ["+", 8, 201, 0, 195, 8, 196, 0, 57, 0, 24], ["+", 8, 196, 0, 57, 15, 16, 31, 16, 31, 22], ["+", 8, 196, 0, 57, 15, 16, 31, 16, 17, 109], ["+", 8, 196, 0, 57, 15, 16, 31, 16, 12, 203], ["+", 0, 195, 8, 196, 0, 57, 15, 16, 17, 60], ["+", 0, 195, 8, 196, 0, 57, 15, 16, 12, 2... | 8 | 661 | 32 |
using System;
using System.Collections.Generic;
using System.Linq;
namespace MP2019A {
class MainClass {
static int[] s;
static int[] n;
public static void Main(string[] args) {
s = Array.ConvertAll(Console.ReadLine().Split().ToArray(), int.Parse);
if ((s[0] + 1) / 2 <= s[1]) {
Console.WriteLin... | using System;
using System.Collections.Generic;
using System.Linq;
namespace MP2019A {
class MainClass {
static int[] s;
public static void Main(string[] args) {
s = Array.ConvertAll(Console.ReadLine().Split().ToArray(), int.Parse);
if ((s[0] + 1) / 2 >= s[1]) {
Console.WriteLine("YES");
} el... | [["-", 0, 235, 8, 201, 0, 124, 0, 251, 0, 115], ["-", 8, 201, 0, 124, 0, 198, 39, 224, 39, 199], ["-", 0, 124, 0, 198, 39, 224, 225, 226, 0, 70], ["-", 0, 124, 0, 198, 39, 224, 225, 226, 0, 73], ["-", 8, 201, 0, 124, 0, 198, 0, 200, 141, 22], ["-", 8, 201, 0, 235, 8, 201, 0, 124, 0, 35], ["-", 0, 195, 8, 196, 0, 57, 15... | 8 | 115 | 12 |
using System;
using System.Collections.Generic;
using System.Linq;
using static Input;
public class Prog {
private const int INF = 1000000007;
public static void Main() {
long K = NextInt();
long k = K;
int A = NextInt();
int B = NextInt();
long C = 1;
//最初は手動
long c = A - C + 2;
K ... | using System;
using System.Collections.Generic;
using System.Linq;
using static Input;
public class Prog {
private const int INF = 1000000007;
public static void Main() {
long K = NextInt();
long k = K;
int A = NextInt();
int B = NextInt();
long C = 1;
//最初は手動
long c = A - C + 2;
K ... | [["+", 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, 18], ["+", 0, 195, 8, 196, 0, 57, 15, 16, 12, 203], ["+", 8, 201, 0, 195, 8, 196, 0, 57, 0, 25], ["+", 0, 195, 8, 196, 0, 57, 64, 196, 0, 45]... | 8 | 427 | 19 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
using static System.Math;
class Z {
static void Main() => new K();
}
class K {
int F => int.Parse(Str);
... | using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
using static System.Math;
class Z {
static void Main() => new K();
}
class K {
int F => int.Parse(Str);
... | [["+", 3, 4, 0, 28, 0, 16, 12, 23, 0, 24], ["+", 0, 16, 12, 23, 0, 41, 15, 16, 17, 60], ["+", 0, 16, 12, 23, 0, 41, 15, 16, 12, 203], ["+", 0, 28, 0, 16, 12, 23, 0, 41, 0, 101], ["+", 0, 28, 0, 16, 12, 23, 0, 41, 64, 203], ["+", 0, 28, 0, 16, 12, 23, 0, 41, 0, 102], ["+", 12, 23, 0, 41, 75, 16, 31, 204, 205, 22], ["+",... | 8 | 516 | 11 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
using static System.Math;
class Z {
static void Main() => new K();
}
class K {
int F => int.Parse(Str);
... | using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
using static System.Math;
class Z {
static void Main() => new K();
}
class K {
int F => int.Parse(Str);
... | [["+", 0, 7, 8, 196, 0, 1, 0, 11, 31, 22], ["+", 8, 196, 0, 1, 0, 11, 0, 202, 0, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 12, 22], ["+", 8, 196, 0, 7, 8, 196, 0, 1, 0, 35], ["-", 0, 11, 12, 16, 31, 213, 63, 214, 205, 22], ["-", 0, 11, 12, 16, 31, 213, 63, 214, 0, 131], ["-", 0, 11, 12, 16, 31, 213, 63, 214, 141, 22], ["-"... | 8 | 635 | 38 |
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
namespace AtTest.ABC_117 {
class D {
static void Main(string[] args) {
Method(args);
Console.ReadLine();
}
static void Method(string[] args) {
long[] nk = ReadLongs();
var array = ReadLongs();
... | using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
namespace AtTest.ABC_117 {
class D {
static void Main(string[] args) {
Method(args);
Console.ReadLine();
}
static void Method(string[] args) {
long[] nk = ReadLongs();
var array = ReadLongs();
... | [["+", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 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 | 539 | 7 |
using System;
using System.Linq;
using System.Collections.Generic;
class Dmondai {
static void Main() {
var line =
Console.ReadLine().Split(' ').Select(x => Int64.Parse(x)).ToArray();
var N = line[0];
var K = line[1];
var A = Console.ReadLine().Split(' ').Select(x => Int64.Parse(x)).ToArray()... | using System;
using System.Linq;
using System.Collections.Generic;
class Dmondai {
static void Main() {
var line =
Console.ReadLine().Split(' ').Select(x => Int64.Parse(x)).ToArray();
var N = line[0];
var K = line[1];
var A = Console.ReadLine().Split(' ').Select(x => Int64.Parse(x)).ToArray()... | [["+", 0, 195, 8, 196, 0, 1, 0, 11, 31, 22], ["+", 8, 196, 0, 1, 0, 11, 0, 202, 0, 177], ["+", 8, 196, 0, 1, 0, 11, 12, 74, 0, 24], ["+", 8, 196, 0, 1, 0, 11, 12, 74, 39, 199], ["+", 8, 196, 0, 1, 0, 11, 12, 74, 0, 25], ["+", 8, 196, 0, 1, 0, 11, 12, 74, 51, 22], ["+", 8, 201, 0, 195, 8, 196, 0, 1, 0, 35], ["-", 0, 195... | 8 | 321 | 19 |
using System;
using System.Collections.Generic;
class Program {
static void Main(string[] args) {
string[] str = Console.ReadLine().Split();
int N = int.Parse(str[0]);
long K = long.Parse(str[1]);
string[] str2 = Console.ReadLine().Split();
long[] A = new long[N];
for (var i = 0; i < N; i++) {... | using System;
using System.Collections.Generic;
class Program {
static void Main(string[] args) {
string[] str = Console.ReadLine().Split();
int N = int.Parse(str[0]);
long K = long.Parse(str[1]);
string[] str2 = Console.ReadLine().Split();
long[] A = new long[N];
for (var i = 0; i < N; i++) {... | [["+", 64, 196, 0, 1, 0, 11, 31, 204, 205, 22], ["+", 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], ["+", 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],... | 8 | 493 | 31 |
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
namespace ABC117D {
public class Program {
void Solve(StreamScanner ss, StreamWriter sw) {
//---------------------------------
const int MAX = 50;
var N = ss.Next(int.Parse);
var K = ss.Next(long.Parse);
var A = ... | using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
namespace ABC117D {
public class Program {
void Solve(StreamScanner ss, StreamWriter sw) {
//---------------------------------
const int MAX = 50;
var N = ss.Next(int.Parse);
var K = ss.Next(long.Parse);
var A = ... | [["+", 8, 196, 0, 57, 75, 196, 0, 57, 0, 121], ["+", 8, 196, 0, 57, 75, 196, 0, 57, 0, 24], ["+", 0, 57, 75, 196, 0, 57, 15, 16, 31, 22], ["+", 0, 57, 75, 196, 0, 57, 15, 16, 17, 47], ["+", 0, 57, 75, 196, 0, 57, 15, 16, 12, 203], ["+", 8, 196, 0, 57, 75, 196, 0, 57, 0, 25], ["+", 0, 16, 31, 16, 12, 16, 31, 204, 205, 2... | 8 | 706 | 15 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AtCoderBeginnerContest117Fourth {
class Program {
static void Main(string[] args) {
// 整数の入力
// int N = int.Parse(Console.ReadLine());
// スペース区切りの整数の入力
string[] input1 = Conso... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace D_XXOR {
class Program {
static void Main(string[] args) {
// 整数の入力
// int N = int.Parse(Console.ReadLine());
// スペース区切りの整数の入力
string[] input1 = Console.ReadLine().Split(' ');... | [["-", 36, 36, 36, 36, 0, 208, 0, 209, 141, 22], ["+", 36, 36, 36, 36, 0, 208, 0, 209, 141, 22], ["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["-", 8, 201, 0, 195, 8, 196, 0, 7, 0, 35], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 31, 22], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 10, 198, 0, 200, 0, 212, 0, 16, 17, 3... | 8 | 379 | 16 |
using System;
using System.IO;
using System.Linq;
namespace Contest {
class Scanner {
public Scanner() {
_stream = new StreamReader(Console.OpenStandardInput());
_pos = 0;
_line = new string[0];
_separator = ' ';
}
private char _separator;
private StreamReader _stream;
private int _pos;
pr... | using System;
using System.IO;
using System.Linq;
namespace Contest {
class Scanner {
public Scanner() {
_stream = new StreamReader(Console.OpenStandardInput());
_pos = 0;
_line = new string[0];
_separator = ' ';
}
private char _separator;
private StreamReader _stream;
private int _pos;
pr... | [["-", 8, 196, 0, 7, 8, 196, 0, 57, 0, 121], ["-", 8, 196, 0, 7, 8, 196, 0, 57, 0, 24], ["-", 8, 196, 0, 57, 15, 16, 31, 16, 31, 22], ["-", 8, 196, 0, 57, 15, 16, 31, 16, 17, 109], ["-", 8, 196, 0, 57, 15, 16, 31, 16, 12, 203], ["-", 0, 7, 8, 196, 0, 57, 15, 16, 17, 60], ["-", 0, 7, 8, 196, 0, 57, 15, 16, 12, 203], ["-... | 8 | 2,524 | 36 |
using System;
using System.Linq;
using System.Collections.Generic;
using E = System.Linq.Enumerable;
public class Program {
public static void Main() {
var nk = Console.ReadLine().Split().Select(x => long.Parse(x)).ToArray();
var n = nk[0];
var k = nk[1];
var ts = Console.ReadLine().Split().Select(x... | using System;
using System.Linq;
using System.Collections.Generic;
using E = System.Linq.Enumerable;
public class Program {
public static void Main() {
var nk = Console.ReadLine().Split().Select(x => long.Parse(x)).ToArray();
var n = nk[0];
var k = nk[1];
var ts = Console.ReadLine().Split().Select(x... | [["-", 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, 60], ["-", 0, 195, 8, 196, 0, 57, 15, 16, 12, 203], ["-", 8, 201, 0, 195, 8, 196, 0, 57, 0, 25], ["-", 0, 195, 8, 196, 0, 57, 64, 196, 0, 45]... | 8 | 220 | 29 |
using System;
using System.Collections.Generic;
public class Test {
public static void Main() {
// while(true){
string[] str1 = Console.ReadLine().Split(' ');
int n = int.Parse(str1[0]);
ulong m = ulong.Parse(str1[1]);
// if(n == 0) break;
ulong[] a =
Array.ConvertAll(Console.Re... | using System;
using System.Collections.Generic;
public class Test {
public static void Main() {
// while(true){
string[] str1 = Console.ReadLine().Split(' ');
int n = int.Parse(str1[0]);
ulong m = ulong.Parse(str1[1]);
// if(n == 0) break;
ulong[] a =
Array.ConvertAll(Console.Re... | [["+", 0, 198, 0, 200, 0, 212, 0, 16, 17, 72], ["+", 0, 198, 0, 200, 0, 212, 0, 16, 12, 203], ["-", 0, 57, 64, 1, 0, 11, 12, 241, 0, 33], ["-", 0, 57, 64, 1, 0, 11, 12, 241, 0, 203], ["+", 8, 196, 0, 57, 64, 1, 0, 11, 12, 203], ["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 7, 10, 198, 0, 200, 0, 212, 0, 22], [... | 8 | 332 | 19 |
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... | [["+", 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, 200, 0, 212, 0, 41, 15, 16, 31, 22], ["+", 0, 200, 0, 212, 0, 41, 15, 16, 17, 19], ["+", 0, 200, 0, 212, 0, 41, 15, 16, 12, 203], ["+", 0, 198, 0, 200, 0, 212, 0, 41, 0... | 8 | 197 | 13 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp61 {
class Program {
static void Main(string[] args) {
int s = int.Parse(Console.ReadLine());
var ansList = new List<int>();
int cnt = 1;
while (true) {
if ... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp61 {
class Program {
static void Main(string[] args) {
int s = int.Parse(Console.ReadLine());
var ansList = new List<int>();
ansList.Add(s);
int cnt = 1;
whil... | [["+", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 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 | 137 | 7 |
using System;
using System.Collections.Generic;
using System.Linq;
class Program {
static void Main(string[] args) {
var S = sc.ReadInt();
var map = new HashMap<int, int>();
map[1] = S;
var before = S;
var ans = 0;
for (int i = 2; i <= 1000000; i++) {
var x = F(before);
if (map[x]... | using System;
using System.Collections.Generic;
using System.Linq;
class Program {
static void Main(string[] args) {
var S = sc.ReadInt();
var map = new HashMap<int, int>();
map[S] = 1;
var ai = S;
var ans = 0;
for (int i = 2; i <= 1000000; i++) {
ai = F(ai);
map[ai]++;
if (... | [["-", 0, 11, 31, 204, 206, 207, 0, 28, 0, 203], ["+", 0, 11, 31, 204, 206, 207, 0, 28, 0, 22], ["-", 0, 195, 8, 196, 0, 1, 0, 11, 12, 22], ["+", 0, 195, 8, 196, 0, 1, 0, 11, 12, 203], ["-", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["+", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["-", 8, 196, 0, 197, 0, 198, 39, 216, ... | 8 | 970 | 31 |
using System;
using System.Linq;
using System.Collections.Generic;
using System.IO;
class Program {
public static long Read() { return long.Parse(Console.ReadLine()); }
public static long[] Reads() {
return Console.ReadLine().Split().Select(long.Parse).ToArray();
}
public static void Main() {
var sw ... | using System;
using System.Linq;
using System.Collections.Generic;
using System.IO;
class Program {
public static long Read() { return long.Parse(Console.ReadLine()); }
public static long[] Reads() {
return Console.ReadLine().Split().Select(long.Parse).ToArray();
}
public static void Main() {
var sw ... | [["-", 8, 201, 0, 195, 8, 196, 0, 57, 0, 25], ["-", 0, 57, 64, 1, 0, 213, 63, 214, 205, 22], ["-", 0, 57, 64, 1, 0, 213, 63, 214, 0, 131], ["-", 0, 57, 64, 1, 0, 213, 63, 214, 141, 22], ["-", 0, 57, 64, 1, 0, 213, 3, 4, 0, 24], ["-", 64, 1, 0, 213, 3, 4, 0, 28, 0, 203], ["-", 0, 57, 64, 1, 0, 213, 3, 4, 0, 25], ["-", 0... | 8 | 202 | 12 |
using System;
using System.Linq;
class Procon {
public Procon() {}
static void Main(string[] agrs) { new Procon().Do(); }
Scanner cin;
public void Do() {
cin = new Scanner();
var s = cin.nextInt();
var isCalced = new bool[1000000];
var a = new int[1000000];
for (int i = 0; i < 1000000; ... | using System;
using System.Linq;
class Procon {
public Procon() {}
static void Main(string[] agrs) { new Procon().Do(); }
Scanner cin;
public void Do() {
cin = new Scanner();
var s = cin.nextInt();
var isCalced = new bool[1000000];
var a = new int[1000000];
for (int i = 0; i < 1000000; ... | [["+", 8, 196, 0, 1, 0, 11, 31, 204, 205, 22], ["+", 0, 1, 0, 11, 31, 204, 206, 207, 0, 70], ["+", 31, 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, 203], ["+", 206, 207, 0, 28, 0, 204, 206, 207, 0, 73], ["+", 0, 1, 0, 11, 31, 204, 206,... | 8 | 624 | 10 |
using System;
using System.Collections.Generic;
class Plogram {
static void Main() {
var num = int.Parse(Console.ReadLine());
var list = new List<int>();
list.Add(num);
for (int i = 0; i < 100; i++) {
if (list[i] % 2 == 0) {
num = num / 2;
} else {
num = num * 3 + 1;
... | using System;
using System.Collections.Generic;
class Plogram {
static void Main() {
var num = int.Parse(Console.ReadLine());
var list = new List<int>();
list.Add(num);
while (true) {
if (num % 2 == 0) {
num = num / 2;
} else {
num = num * 3 + 1;
}
if (list.... | [["-", 8, 201, 0, 195, 8, 196, 0, 7, 0, 88], ["+", 8, 201, 0, 195, 8, 196, 0, 52, 0, 89], ["-", 0, 195, 8, 196, 0, 7, 10, 198, 39, 199], ["-", 8, 196, 0, 7, 10, 198, 0, 200, 141, 22], ["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 32], ["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["-", 8, 201, 0, 195, 8, 196, 0, 7, 0, 35], [... | 8 | 133 | 19 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using static System.Console;
using static System.Math;
namespace At {
class Program {
static void Main(string[] args) {
var count = 0;
var s = ReadInt();
while (true) {
count++;
if (s == 4) {
break;
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using static System.Console;
using static System.Math;
namespace At {
class Program {
static void Main(string[] args) {
var count = 0;
var s = ReadInt();
while (true) {
count++;
if (s == 1 || s == 2 || s == ... | [["+", 0, 57, 15, 16, 31, 16, 31, 16, 12, 203], ["+", 8, 196, 0, 57, 15, 16, 31, 16, 17, 106], ["+", 0, 57, 15, 16, 31, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 16, 31, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 16, 31, 16, 12, 16, 12, 203], ["+", 0, 52, 8, 196, 0, 57, 15, 16, 17, 106], ["+", 8, 196, 0, 57, 15, 16, 12, 16, 31,... | 8 | 384 | 22 |
using System;
using System.Linq;
using System.Collections.Generic;
namespace AtCoder {
class Program {
public static void Main(string[] args) {
int s = int.Parse(Console.ReadLine());
int n = 1;
int[] a = new int[1000001];
a[s] = 1;
for (int i = 0; i < 1000001; i++) {
a[i] = 0;
}
whi... | using System;
using System.Linq;
using System.Collections.Generic;
namespace AtCoder {
class Program {
public static void Main(string[] args) {
int s = int.Parse(Console.ReadLine());
int n = 1;
int[] a = new int[1000001];
for (int i = 0; i < 1000001; i++) {
a[i] = 0;
}
a[s] = 1;
whi... | [["-", 8, 196, 0, 1, 0, 11, 31, 204, 205, 22], ["-", 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], ["-", 0, 195, 8, 196, 0, 1, 0, 11, 12, 203], ["-", 8, 201, 0, 195, 8, 196, 0, 1, 0, 35], ["... | 8 | 175 | 14 |
using System;
using System.Text;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using static System.Console;
using static System.Math;
namespace AtCoder {
public class Program {
public static void Main(string[] args) {
new Program().Solve(new ConsoleInput(Console.In, ' '));
}
... | using System;
using System.Text;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using static System.Console;
using static System.Math;
namespace AtCoder {
public class Program {
public static void Main(string[] args) {
new Program().Solve(new ConsoleInput(Console.In, ' '));
}
... | [["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["-", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 32], ["-", 0, 198, 0, 200, 0, 212, 0, 211, 0, 147], ["-", 8, 201, 0, 195, 8, 196, 0, 197, 0, 35], ["-", 8, 196, 0, 7, 8, 196, 0, 57, 0, 121], ["+", 8, 196, 0, 7, 8, 196, 0, 7, 0, 88]... | 8 | 561 | 43 |
using System;
using System.Collections.Generic;
class Program {
static void Main(string[] args) {
long A = long.Parse(Console.ReadLine());
int ct = 0;
while (true) {
ct++;
if (A == 1) {
ct++;
break;
} else if (A % 2 == 1) {
A = A * 3 + 1;
} else {
A ... | using System;
using System.Collections.Generic;
class Program {
static void Main(string[] args) {
long A = long.Parse(Console.ReadLine());
int ct = 0;
while (true) {
ct++;
if (A == 1) {
ct++;
break;
} else if (A % 2 == 1) {
A = A * 3 + 1;
} else {
A ... | [["+", 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], ["+", 0, 28, 0, 213, 3, 4, 0, 28, 0, 203], ["+", 3, 4, 0, 28, 0, 213, 3, 4, 0, 21], ["+", 3, 4, 0, 28, 0, 213, 3, 4, 0, 25]] | 8 | 99 | 7 |
using System;
using System.Collections.Generic;
using System.Linq;
public class Hello {
private const int INF = 1000000007;
public static void Main() {
int s = Input.Cin<int>();
HashSet<int> hs = new HashSet<int>();
int c = 1;
while (true) {
int box = (s % 2 == 0 ? s / 2 : 3 * s + 1);
i... | using System;
using System.Collections.Generic;
using System.Linq;
public class Hello {
private const int INF = 1000000007;
public static void Main() {
int s = Input.Cin<int>();
HashSet<int> hs = new HashSet<int>();
hs.Add(s);
while (true) {
int box = (s % 2 == 0 ? s / 2 : 3 * s + 1);
i... | [["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["-", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 32], ["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["+", 8, 196, 0, 1, 0, 213, 63, 214, ... | 8 | 632 | 19 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace PaizaSkillCheck {
public class Program {
public static int[] A = new int[1000000];
public static void Main(string[] args) {
// string[] line = Console.ReadLin... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace PaizaSkillCheck {
public class Program {
public static int[] A = new int[1000000];
public static void Main(string[] args) {
// string[] line = Console.ReadLin... | [["+", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 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, 21], ["+", 0, 213, 3, 4, 0, 28, 0, 211, 0, 146], ["+", 8, 1... | 8 | 209 | 9 |
using System.Collections.Generic;
using System;
public class Hello {
public static void Main() {
var s = long.Parse(Console.ReadLine().Trim());
var hs = new HashSet<long>();
var pre = s;
var w = 0L;
for (int i = 2; i <= 1000000; i++) {
if (pre % 2 == 0) {
w = pre / 2;
if (!h... | using System.Collections.Generic;
using System;
public class Hello {
public static void Main() {
var s = long.Parse(Console.ReadLine().Trim());
var hs = new HashSet<long>();
var pre = s;
hs.Add(s);
var w = 0L;
for (int i = 2; i <= 1000000; i++) {
if (pre % 2 == 0) {
w = pre / 2;... | [["+", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 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 | 151 | 7 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Numerics;
using System.IO;
using System.Runtime.InteropServices;
using static System.Math;
using stat... | using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Numerics;
using System.IO;
using System.Runtime.InteropServices;
using static System.Math;
using stat... | [["+", 8, 196, 0, 57, 15, 213, 63, 214, 205, 22], ["+", 8, 196, 0, 57, 15, 213, 63, 214, 0, 131], ["+", 8, 196, 0, 57, 15, 213, 63, 214, 141, 22], ["+", 8, 196, 0, 57, 15, 213, 3, 4, 0, 24], ["+", 0, 28, 0, 218, 54, 219, 0, 220, 141, 22], ["+", 15, 213, 3, 4, 0, 28, 0, 218, 0, 221], ["+", 3, 4, 0, 28, 0, 218, 8, 16, 31... | 8 | 1,146 | 21 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AtCorder {
public class Program {
static void Main(string[] args) {
int n = int.Parse(Console.ReadLine());
int[] a = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
in... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AtCorder {
public class Program {
static void Main(string[] args) {
int n = int.Parse(Console.ReadLine());
int[] a = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
in... | [["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 22], ["+", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203], ["-", 0, 52, 8, 196, 0, 1, 0, 241, 0, 29], ["-", 0, 52, 8, 196, 0, 1, 0, 241, 0, 22], ["-", 8, 196, 0, 52, 8, 196, 0, 1, 0, 35], ["-", 0, 57, 75, 196, 0, 57, 15, 16, 17, 18], ["+", 0, 57, 75, 196, 0, 57, 15, 16, 17, 47], ["+",... | 8 | 175 | 10 |
using System;
using System.Linq;
namespace CSharp {
class Program {
static void Main(string[] args) {
var N = Console.ReadLine().Split().Select(int.Parse).ToArray()[0];
var H = Console.ReadLine().Split().Select(int.Parse).ToArray();
// var N = 4;
// var H = new int[] { 1, 2, 2, 1 };
// 1 2 2 1
... | using System;
using System.Linq;
namespace CSharp {
class Program {
static void Main(string[] args) {
// var N = 5;
// var H = new int[] { 3, 1, 2, 3, 1 };
// // 5
// // 3 1 2 3 1
// // 1 2 2 1
var N = Console.ReadLine().Split().Select(int.Parse).ToArray()[0];
var H = Console... | [["+", 0, 52, 8, 196, 0, 57, 64, 196, 0, 45], ["+", 8, 196, 0, 57, 64, 196, 0, 1, 0, 35], ["+", 0, 52, 8, 196, 0, 57, 64, 196, 0, 46], ["+", 8, 196, 0, 52, 8, 196, 0, 57, 0, 95], ["+", 0, 52, 8, 196, 0, 57, 75, 196, 0, 45], ["+", 8, 196, 0, 57, 75, 196, 0, 93, 0, 94], ["+", 0, 52, 8, 196, 0, 57, 75, 196, 0, 46], ["+", ... | 8 | 157 | 16 |
using System;
using System.Linq;
namespace train {
class Program {
static void Main(string[] args) {
int num = int.Parse(Console.ReadLine());
string strFlowers = Console.ReadLine();
string[] flower = strFlowers.Split(' ');
int[] flowers = flower.Select(f => int.Parse(f)).ToArray();
int water = 0... | using System;
using System.Linq;
namespace train {
class Program {
static void Main(string[] args) {
int num = int.Parse(Console.ReadLine());
string strFlowers = Console.ReadLine();
string[] flower = strFlowers.Split(' ');
int[] flowers = flower.Select(f => int.Parse(f)).ToArray();
int water = 0... | [["-", 8, 201, 0, 195, 8, 196, 0, 82, 0, 170], ["+", 8, 201, 0, 195, 8, 196, 0, 52, 0, 89], ["+", 8, 201, 0, 195, 8, 196, 0, 52, 0, 24], ["+", 0, 52, 15, 16, 31, 213, 63, 214, 205, 22], ["+", 0, 52, 15, 16, 31, 213, 63, 214, 0, 131], ["+", 0, 52, 15, 16, 31, 213, 63, 214, 141, 22], ["+", 0, 52, 15, 16, 31, 213, 3, 4, 0... | 8 | 260 | 30 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Program {
static void Main(string[] args) {
Console.ReadLine();
int[] input =
Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
bool isUP = true;
int bef... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Program {
static void Main(string[] args) {
Console.ReadLine();
int[] input =
Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
bool isUP = true;
int bef... | [["+", 0, 195, 8, 196, 0, 1, 0, 11, 31, 22], ["+", 8, 196, 0, 1, 0, 11, 0, 202, 0, 107], ["+", 8, 196, 0, 1, 0, 11, 12, 41, 15, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 41, 0, 101], ["+", 8, 196, 0, 1, 0, 11, 12, 41, 64, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 41, 0, 102], ["+", 8, 196, 0, 1, 0, 11, 12, 41, 75, 203], ["+", 8, 2... | 8 | 168 | 8 |
using System;
using System.Linq;
namespace ABC116_C {
class Program {
static void Main(string[] args) {
var N = int.Parse(Console.ReadLine());
var h = Console.ReadLine().Split().Select(int.Parse).ToArray();
long cnt = 0;
var min = 0;
for (int i = 0; i < N - 1; i++) {
if (h[i] <= h[i + 1])
... | using System;
using System.Linq;
namespace ABC116_C {
class Program {
static void Main(string[] args) {
var N = int.Parse(Console.ReadLine());
var h = Console.ReadLine().Split().Select(int.Parse).ToArray();
if (h.Length == 1) {
Console.WriteLine(h[0]);
return;
}
long cnt = 0;
va... | [["+", 8, 201, 0, 195, 8, 196, 0, 57, 0, 121], ["+", 8, 201, 0, 195, 8, 196, 0, 57, 0, 24], ["+", 8, 196, 0, 57, 15, 16, 31, 214, 205, 22], ["+", 8, 196, 0, 57, 15, 16, 31, 214, 0, 131], ["+", 8, 196, 0, 57, 15, 16, 31, 214, 141, 22], ["+", 0, 195, 8, 196, 0, 57, 15, 16, 17, 60], ["+", 0, 195, 8, 196, 0, 57, 15, 16, 12... | 8 | 163 | 22 |
using Yorukatsu051.Questions;
using Yorukatsu051.Extensions;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace Yorukatsu051.Questions {
/// <summary>
/// https://atcoder.jp/contests/abc116/tasks/abc116_d
/// </summary>
public class QuestionF : AtCo... | using Yorukatsu051.Questions;
using Yorukatsu051.Extensions;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace Yorukatsu051.Questions {
/// <summary>
/// https://atcoder.jp/contests/abc116/tasks/abc116_d
/// </summary>
public class QuestionF : AtCo... | [["+", 0, 195, 8, 196, 0, 52, 15, 16, 17, 98], ["+", 0, 52, 15, 16, 12, 16, 31, 214, 205, 22], ["+", 0, 52, 15, 16, 12, 16, 31, 214, 0, 131], ["+", 0, 52, 15, 16, 12, 16, 31, 214, 141, 22], ["+", 8, 196, 0, 52, 15, 16, 12, 16, 17, 47], ["+", 8, 196, 0, 52, 15, 16, 12, 16, 12, 203], ["-", 8, 196, 0, 197, 0, 198, 39, 216... | 8 | 1,353 | 15 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using static ABC116D.Input;
namespace ABC116D {
static class Input {
/// <summary>
/// 1行の入力をTに応じてリストに変換する関数を返す
/// </summary>
static Func<string, List<T>>
Cast<T>() => _ => _.Split(' ').Select(Conve... | using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using static ABC116D.Input;
namespace ABC116D {
static class Input {
/// <summary>
/// 1行の入力をTに応じてリストに変換する関数を返す
/// </summary>
static Func<string, List<T>>
Cast<T>() => _ => _.Split(' ').Select(Conve... | [["+", 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, 198, 0, 200, 0, 212, 0, 211, 0, 146], ["+", 8, 196, 0, 52, 8, 196, 0, 197, 0, 35], ["+", 8, 196, 0, 57, 64, 196, 0, 1, 0, 35], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 31, 22... | 8 | 2,391 | 29 |
using System;
using System.Linq;
using System.Collections.Generic;
namespace Contest {
class Program {
static void Main(string[] args) { ABC116.D(); }
class ABC116 {
public static void A() { Console.WriteLine(Read.Int() * Read.Int() / 2); }
public static void B() {
var s = Read.Int();
HashSet<... | using System;
using System.Linq;
using System.Collections.Generic;
namespace Contest {
class Program {
static void Main(string[] args) { ABC116.D(); }
class ABC116 {
public static void A() { Console.WriteLine(Read.Int() * Read.Int() / 2); }
public static void B() {
var s = Read.Int();
HashSet<... | [["+", 8, 196, 0, 197, 0, 198, 39, 236, 141, 22], ["+", 0, 197, 0, 198, 39, 236, 237, 238, 0, 18], ["+", 0, 197, 0, 198, 39, 236, 237, 238, 0, 199], ["+", 0, 197, 0, 198, 39, 236, 237, 238, 0, 47], ["+", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["+", 0, 197, 0, 198, 0, 200, 0, 212, 0, 32], ["+", 0, 198, 0, 200, 0, 212... | 8 | 3,125 | 33 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Text;
using System.Linq;
using E = System.Linq.Enumerable;
internal partial class Solver {
struct Sushi {
public int Type, Point;
}
public void Run()... | using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Text;
using System.Linq;
using E = System.Linq.Enumerable;
internal partial class Solver {
struct Sushi {
public int Type, Point;
}
public void Run()... | [["+", 75, 196, 0, 1, 0, 11, 31, 204, 205, 22], ["+", 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], ["+", 75, 196, 0, 1, 0, 11, 0, 202, 0, 32], ["+", 75, 196, 0, 1, 0, 11, 12, 211, 0, 146], ["+", 8, 196, 0, 57, 75, 196, 0, 1, 0, 35]] | 8 | 1,254 | 7 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using static System.Math;
using static System.Array;
using static AtCoder.Tool;
namespace AtCoder {
class AC {
const int MOD = 1000000007;
const int INF = int.MaxValue / 2;
const long SINF = long.MaxValue / 2;
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using static System.Math;
using static System.Array;
using static AtCoder.Tool;
namespace AtCoder {
class AC {
const int MOD = 1000000007;
const int INF = int.MaxValue / 2;
const long SINF = long.MaxValue / 2;
... | [["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 121], ["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 24], ["+", 0, 57, 15, 16, 31, 213, 63, 214, 205, 22], ["+", 0, 57, 15, 16, 31, 213, 63, 214, 0, 131], ["+", 0, 57, 15, 16, 31, 213, 63, 214, 141, 22], ["+", 0, 57, 15, 16, 31, 213, 3, 4, 0, 24], ["+", 0, 57, 15, 16, 31, 213, 3, 4, 0, 25]... | 8 | 1,064 | 14 |
using System;
using System.Collections.Generic;
using System.Linq;
namespace CSharpSample01 {
struct Sushi {
public int t; //ネタID
public int d; //おいしさ
public Sushi(int neta, int oisisa) {
t = neta;
d = oisisa;
}
}
// Sushiノードの優先度付きキュー
//おいしさdが対象
class PriorityQueue_Sushi {
int H;
//高速に要素にアクセスするため... | using System;
using System.Collections.Generic;
using System.Linq;
namespace CSharpSample01 {
struct Sushi {
public int t; //ネタID
public int d; //おいしさ
public Sushi(int neta, int oisisa) {
t = neta;
d = oisisa;
}
}
// Sushiノードの優先度付きキュー
//おいしさdが対象
class PriorityQueue_Sushi {
int H;
//高速に要素にアクセスするため... | [["+", 0, 52, 8, 196, 0, 57, 15, 16, 17, 106], ["+", 15, 16, 12, 16, 31, 213, 63, 214, 205, 22], ["+", 15, 16, 12, 16, 31, 213, 63, 214, 0, 131], ["+", 15, 16, 12, 16, 31, 213, 63, 214, 141, 22], ["+", 15, 16, 12, 16, 31, 213, 3, 4, 0, 24], ["+", 8, 196, 0, 57, 15, 16, 12, 16, 17, 60], ["+", 8, 196, 0, 57, 15, 16, 12, ... | 8 | 1,272 | 8 |
using System;
using System.Linq;
using System.Collections.Generic;
class Dmondai {
static void Main() {
var line =
Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).ToArray();
var N = line[0];
var K = line[1];
var list = new List<long[]>();
var netaAllCount = 0L;
for (int i = ... | using System;
using System.Linq;
using System.Collections.Generic;
class Dmondai {
static void Main() {
var line =
Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).ToArray();
var N = line[0];
var K = line[1];
var list = new List<long[]>();
var netaAllCount = 0L;
for (int i = ... | [["-", 0, 57, 15, 16, 31, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 16, 31, 16, 31, 16, 17, 19], ["-", 0, 57, 15, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 196, 0, 57, 15, 16, 31, 16, 17, 106], ["-", 0, 7, 8, 196, 0, 57, 15, 16, 17, 106], ["-", 8, 196, 0, 57, 15, 16, 12, 16, 31, 22], ["-", 8, 196, 0, 57, 15, 16, 12, 16, 17, 19... | 8 | 501 | 8 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ABC116 {
class Sushi {
public long d;
public int t;
public bool top;
}
class D {
static void Main(string[] args) {
string[] s = Console.ReadLine().Split(' ');
int N = int.Parse... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ABC116 {
class Sushi {
public long d;
public int t;
public bool top;
}
class D {
static void Main(string[] args) {
string[] s = Console.ReadLine().Split(' ');
int N = int.Parse... | [["-", 0, 195, 8, 196, 0, 52, 15, 211, 0, 146], ["+", 8, 196, 0, 52, 15, 16, 31, 16, 31, 22], ["+", 8, 196, 0, 52, 15, 16, 31, 16, 17, 20], ["+", 8, 196, 0, 52, 15, 16, 31, 16, 12, 203], ["+", 0, 195, 8, 196, 0, 52, 15, 16, 17, 98], ["+", 8, 196, 0, 52, 15, 16, 12, 16, 31, 22], ["+", 8, 196, 0, 52, 15, 16, 12, 16, 17, ... | 8 | 465 | 8 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
namespace AtCoder {
class Program {
private static string Read() { return Console.ReadLine(); }
private static int ReadInt() { return int.Parse(Read()); }
private static long ReadLong() { return long.P... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
namespace AtCoder {
class Program {
private static string Read() { return Console.ReadLine(); }
private static int ReadInt() { return int.Parse(Read()); }
private static long ReadLong() { return long.P... | [["-", 8, 196, 0, 52, 15, 16, 12, 16, 17, 60], ["-", 8, 196, 0, 52, 15, 16, 12, 16, 12, 203], ["+", 8, 196, 0, 52, 15, 16, 12, 16, 17, 18], ["+", 8, 196, 0, 52, 15, 16, 12, 16, 12, 203], ["+", 8, 196, 0, 52, 8, 196, 0, 1, 0, 35], ["+", 0, 52, 8, 196, 0, 1, 0, 241, 0, 68], ["+", 0, 52, 8, 196, 0, 1, 0, 241, 0, 22], ["+"... | 8 | 607 | 10 |
using System;
using System.Collections.Generic;
using System.Linq;
class Program {
static void Main() {
Console.WriteLine(Solve());
return;
}
public static string Solve() {
string[] str = Console.ReadLine().Split(' ');
int[] numbers = new int[4];
for (int i = 0; i < 4; i++) {
numbers[i... | using System;
using System.Collections.Generic;
using System.Linq;
class Program {
static void Main() {
Console.WriteLine(Solve());
return;
}
public static string Solve() {
string[] str = Console.ReadLine().Split(' ');
int[] numbers = new int[4];
for (int i = 0; i < 4; i++) {
numbers[i... | [["-", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["-", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["-", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["-", 8, 196, 0, 1, 0, 213, 3, 4, 0, 24], ["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 62], ["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["-", 8, 196, 0, 1, 0, 213, 3, 4, 0, 21], ["-", 3, 4, ... | 8 | 174 | 20 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
class Program {
static void Main(string[] args) {
var keyence = "keyence";
var S = sc.ReadStr();
var ok = S.StartsWith(keyence) || S.EndsWith(keyence);
if (ok) {
Console.WriteLine("YES");
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
class Program {
static void Main(string[] args) {
var keyence = "keyence";
var S = sc.ReadStr();
var ok = S.StartsWith(keyence) || S.EndsWith(keyence);
if (ok) {
Console.WriteLine("YES");
... | [["-", 0, 200, 0, 212, 0, 213, 63, 214, 205, 22], ["+", 0, 200, 0, 212, 0, 213, 63, 214, 205, 22], ["-", 0, 200, 0, 212, 0, 213, 3, 4, 0, 24], ["-", 3, 4, 0, 28, 0, 16, 31, 214, 205, 22], ["-", 3, 4, 0, 28, 0, 16, 31, 214, 0, 131], ["-", 3, 4, 0, 28, 0, 16, 31, 214, 141, 22], ["-", 0, 213, 3, 4, 0, 28, 0, 16, 17, 33], ... | 8 | 720 | 12 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
using static System.Math;
namespace atcoder {
class Program {
static void Main(string[] args) { new Program().Solve(new ConsoleInput(In)); }
public long Min(params long[... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
using static System.Math;
namespace atcoder {
class Program {
static void Main(string[] args) { new Program().Solve(new ConsoleInput(In)); }
public long Min(params long[... | [["-", 0, 7, 8, 196, 0, 1, 0, 213, 63, 22], ["-", 8, 196, 0, 1, 0, 213, 3, 4, 0, 24], ["-", 0, 213, 3, 4, 0, 28, 0, 230, 0, 228], ["-", 0, 213, 3, 4, 0, 28, 0, 230, 39, 199], ["-", 3, 4, 0, 28, 0, 230, 3, 4, 0, 24], ["-", 3, 4, 0, 28, 0, 213, 63, 214, 205, 22], ["-", 3, 4, 0, 28, 0, 213, 63, 214, 0, 131], ["-", 3, 4, 0... | 8 | 685 | 13 |
using System;
using System.Collections.Generic;
using System.Linq;
namespace KPCB {
static class MainClass {
public static void Main(string[] args) {
string S = Console.ReadLine();
string K = "keyence";
var Klst = new List<string>(7) { "k", "e", "y", "e", "n", "c", "e" };
string ans = "NO";
f... | using System;
using System.Collections.Generic;
using System.Linq;
namespace KPCB {
static class MainClass {
public static void Main(string[] args) {
string S = Console.ReadLine();
string K = "keyence";
var Klst = new List<string>(7) { "k", "e", "y", "e", "n", "c", "e" };
string ans = "NO";
f... | [["-", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["-", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["-", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["-", 8, 196, 0, 1, 0, 213, 3, 4, 0, 24], ["-", 31, 16, 31, 16, 31, 16, 31, 16, 31, 22], ["-", 31, 16, 31, 16, 31, 16, 31, 16, 17, 72], ["-", 31, 16, 31, 16, 31, 16, 31, 16, 12, 2... | 8 | 361 | 21 |
using System;
using System.Text;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using E = System.Linq.Enumerable;
using System.IO.Pipes;
class Program {
static char[] abc = "abcdefghijklmnopqrstuvwxyz".ToCharArray();
static long mod = 1000000007;
static void Main(string[] args) {
... | using System;
using System.Text;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using E = System.Linq.Enumerable;
using System.IO.Pipes;
class Program {
static char[] abc = "abcdefghijklmnopqrstuvwxyz".ToCharArray();
static long mod = 1000000007;
static void Main(string[] args) {
... | [["+", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 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, 1... | 8 | 752 | 17 |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.Contracts;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Xml.Schema;
using System.Threading;
using System.Diagnostics.CodeAnalysis;
namespace AtCoder {
public static class Ex {
public stati... | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.Contracts;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Xml.Schema;
using System.Threading;
using System.Diagnostics.CodeAnalysis;
namespace AtCoder {
public static class Ex {
public stati... | [["+", 0, 213, 63, 214, 205, 213, 63, 214, 141, 22], ["+", 0, 213, 63, 214, 205, 213, 3, 4, 0, 24], ["+", 0, 28, 0, 218, 54, 219, 0, 220, 141, 22], ["+", 205, 213, 3, 4, 0, 28, 0, 218, 0, 221], ["+", 205, 213, 3, 4, 0, 28, 0, 218, 8, 22], ["+", 0, 213, 63, 214, 205, 213, 3, 4, 0, 25], ["+", 0, 200, 0, 212, 0, 213, 63, ... | 8 | 2,020 | 7 |
using System;
using System.Linq;
namespace KEYPC2019_C {
class Program {
static void Main(string[] args) {
var N = int.Parse(Console.ReadLine());
var A = Console.ReadLine().Split().Select(long.Parse).ToList();
var B = Console.ReadLine().Split().Select(long.Parse).ToList();
var dif = new long[N];
... | using System;
using System.Linq;
namespace KEYPC2019_C {
class Program {
static void Main(string[] args) {
var N = int.Parse(Console.ReadLine());
var A = Console.ReadLine().Split().Select(long.Parse).ToList();
var B = Console.ReadLine().Split().Select(long.Parse).ToList();
var dif = new long[N];
... | [["-", 8, 196, 0, 1, 0, 11, 12, 41, 64, 203], ["-", 8, 196, 0, 1, 0, 11, 12, 41, 0, 102], ["+", 8, 196, 0, 1, 0, 11, 12, 41, 0, 102], ["+", 8, 196, 0, 1, 0, 11, 12, 41, 75, 203], ["+", 64, 196, 0, 1, 0, 213, 3, 4, 0, 24], ["+", 0, 1, 0, 213, 3, 4, 0, 28, 0, 203], ["+", 64, 196, 0, 1, 0, 213, 3, 4, 0, 25], ["+", 8, 196,... | 8 | 258 | 26 |
using System;
using System.Collections.Generic;
using static Assistant.Input;
using static Assistant.Debug;
using System.Linq;
using Assistant;
namespace Keyence2019D {
class Program {
static void Main(string[] args) {
var N = RInt;
var M = RInt;
var A = RInts.Distinct().OrderBy(x => x).ToArray();
va... | using System;
using System.Collections.Generic;
using static Assistant.Input;
using static Assistant.Debug;
using System.Linq;
using Assistant;
namespace Keyence2019D {
class Program {
static void Main(string[] args) {
var N = RInt;
var M = RInt;
var A = RInts.Distinct().OrderBy(x => x).ToArray();
va... | [["-", 8, 196, 0, 7, 8, 196, 0, 57, 0, 25], ["-", 8, 196, 0, 57, 64, 1, 0, 11, 31, 22], ["-", 0, 57, 64, 1, 0, 11, 0, 202, 0, 32], ["-", 8, 196, 0, 57, 64, 1, 0, 11, 12, 203], ["-", 0, 7, 8, 196, 0, 57, 64, 1, 0, 35], ["-", 8, 196, 0, 7, 8, 196, 0, 57, 0, 121], ["-", 8, 196, 0, 7, 8, 196, 0, 57, 0, 24], ["+", 0, 7, 8, ... | 8 | 1,473 | 12 |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using static System.Console;
using static System.Math;
namespace Atcoder {
class Program {
static StreamWriter sw =
new StreamWriter(OpenStandardOutput()) { AutoFlush = ... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using static System.Console;
using static System.Math;
namespace Atcoder {
class Program {
static StreamWriter sw =
new StreamWriter(OpenStandardOutput()) { AutoFlush = ... | [["-", 0, 16, 31, 23, 0, 16, 31, 16, 31, 22], ["-", 0, 16, 31, 23, 0, 16, 31, 16, 17, 33], ["+", 0, 16, 31, 23, 0, 16, 31, 16, 17, 33], ["+", 0, 16, 31, 23, 0, 16, 31, 16, 12, 22], ["-", 0, 16, 12, 23, 0, 16, 31, 16, 31, 22], ["-", 0, 16, 12, 23, 0, 16, 31, 16, 17, 33], ["+", 0, 16, 12, 23, 0, 16, 31, 16, 17, 33], ["+"... | 8 | 510 | 8 |
using System;
class Program {
static void Main() {
int N = int.Parse(Console.ReadLine());
int H = int.Parse(Console.ReadLine());
int W = int.Parse(Console.ReadLine());
if (H == N && W == N)
Console.WriteLine(1);
else if (H == N && W != N)
Console.WriteLine(N - W + 1);
else if (H !... | using System;
class Program {
static void Main() {
int N = int.Parse(Console.ReadLine());
int H = int.Parse(Console.ReadLine());
int W = int.Parse(Console.ReadLine());
if (H == N && W == N)
Console.WriteLine(1);
else if (H == N)
Console.WriteLine(N - W + 1);
else if (W == N)
... | [["-", 8, 196, 0, 57, 75, 57, 15, 16, 17, 98], ["-", 0, 57, 75, 57, 15, 16, 12, 16, 31, 22], ["-", 0, 57, 75, 57, 15, 16, 12, 16, 17, 79], ["-", 0, 57, 75, 57, 15, 16, 12, 16, 12, 22], ["-", 75, 57, 75, 57, 15, 16, 31, 16, 31, 22], ["-", 75, 57, 75, 57, 15, 16, 31, 16, 17, 79], ["-", 75, 57, 75, 57, 15, 16, 31, 16, 12,... | 8 | 139 | 10 |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using static System.Math;
using System.Text;
using System.Threading;
namespace Program {
public static class AISING2019D {
static public int numberOfRandomCases = 0;
static public void MakeTestCase(List<string> _input, List<string> ... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using static System.Math;
using System.Text;
using System.Threading;
namespace Program {
public static class AISING2019D {
static public int numberOfRandomCases = 0;
static public void MakeTestCase(List<string> _input, List<string> ... | [["+", 0, 198, 0, 200, 0, 212, 0, 16, 17, 33], ["+", 0, 198, 0, 200, 0, 212, 0, 16, 12, 203], ["+", 0, 212, 0, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 212, 0, 16, 31, 23, 0, 16, 12, 203], ["+", 0, 198, 0, 200, 0, 212, 0, 16, 17, 72], ["+", 8, 196, 0, 57, 15, 16, 31, 213, 63, 22], ["+", 0, 57, 15, 16, 31, 213, 3, 4, 0, 24]... | 8 | 9,971 | 22 |
using System;
namespace AtCoder {
class Program {
static void Main(string[] args) {
int n = int.Parse(Console.ReadLine());
string[] input = Console.ReadLine().Split(' ');
Int64[] dp = new Int64[n];
dp[0] = 0;
dp[1] = Math.Abs(int.Parse(input[0]) - int.Parse(input[1]));
for (int i = 2; i < n; ... | using System;
namespace AtCoder {
class Program {
static void Main(string[] args) {
int n = int.Parse(Console.ReadLine());
string[] input = Console.ReadLine().Split(' ');
Int64[] dp = new Int64[n];
dp[0] = 0;
dp[1] = Math.Abs(int.Parse(input[0]) - int.Parse(input[1]));
for (int i = 2; i < n; ... | [["+", 0, 57, 15, 16, 31, 16, 31, 204, 205, 22], ["+", 15, 16, 31, 16, 31, 204, 206, 207, 0, 70], ["+", 31, 204, 206, 207, 0, 28, 0, 16, 31, 22], ["+", 31, 204, 206, 207, 0, 28, 0, 16, 17, 33], ["+", 31, 204, 206, 207, 0, 28, 0, 16, 12, 203], ["+", 15, 16, 31, 16, 31, 204, 206, 207, 0, 73], ["+", 8, 196, 0, 57, 15, 16,... | 8 | 236 | 14 |
using System;
using System.Collections.Generic;
using System.Linq;
class Program {
static string InputPattern = "InputX";
static List<string> GetInputList() {
var WillReturn = new List<string>();
if (InputPattern == "Input1") {
WillReturn.Add("4");
WillReturn.Add("10 30 40 20");
// 30
... | using System;
using System.Collections.Generic;
using System.Linq;
class Program {
static string InputPattern = "InputX";
static List<string> GetInputList() {
var WillReturn = new List<string>();
if (InputPattern == "Input1") {
WillReturn.Add("4");
WillReturn.Add("10 30 40 20");
// 30
... | [["-", 0, 212, 0, 218, 54, 55, 0, 220, 141, 22], ["+", 0, 212, 0, 218, 54, 55, 0, 220, 141, 22], ["-", 0, 218, 8, 196, 0, 197, 0, 198, 39, 199], ["-", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 32], ["-", 0, 198, 0, 200, 0, 212, 0, 16, 31, 22], ["-", 0, 198, 0, 200, 0, 212, 0, 16... | 8 | 389 | 19 |
using System;
class Program {
const int INF = int.MaxValue;
static void Main(string[] args) {
int N;
if (!int.TryParse(Console.ReadLine(), out N))
return;
string[] sh = Console.ReadLine().Split(' ');
int[] h = new int[N];
for (int i = 0; i < N; i++) {
if (!int.TryParse(sh[i], out h... | using System;
class Program {
const int INF = int.MaxValue;
static void Main(string[] args) {
int N;
if (!int.TryParse(Console.ReadLine(), out N))
return;
string[] sh = Console.ReadLine().Split(' ');
int[] h = new int[N];
for (int i = 0; i < N; i++) {
if (!int.TryParse(sh[i], out h... | [["+", 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, 121], ["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 24], ["+", 8, 196, 0, 57, 15, 16, 31, 16, 31, 22], ["+", 8, 196, 0, 57, 15, 16, 31, 16, 17, 72], ["+", 8, 196, 0, 57, 15, 16, 31, 16, 12, 203], ["... | 8 | 279 | 10 |
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Numerics;
namespace dpc {
class Program {
static void Main(string[] args) {
Console.SetOut(
new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
if (File.Exists("input... | using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Numerics;
namespace dpc {
class Program {
static void Main(string[] args) {
Console.SetOut(
new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
if (File.Exists("input... | [["+", 0, 7, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["+", 0, 197, 0, 198, 0, 200, 0, 212, 0, 32], ["+", 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, 196, 0, 7, 8, 196, 0, 197,... | 8 | 298 | 10 |
using System;
using System.Collections.Generic;
using System.Linq;
class Program {
static void Main(string[] args) {
// dp-1
var n = int.Parse(Console.ReadLine());
var inputs = Console.ReadLine().Split(' ');
var hs = inputs.Select(i => int.Parse(i)).ToList();
List<int> dp = new List<int>();
... | using System;
using System.Collections.Generic;
using System.Linq;
class Program {
static void Main(string[] args) {
var n = int.Parse(Console.ReadLine());
var inputs = Console.ReadLine().Split(' ');
var hs = inputs.Select(i => int.Parse(i)).ToList();
List<int> dp = new List<int>();
dp.Add(0);
... | [["+", 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, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["+", 8, 196, 0, 1, 0, 213, 3, 4, 0, 24], ["-", 31,... | 8 | 203 | 20 |
using System;
namespace ConsoleApp1 {
class Program {
static void Main(string[] args) {
int n = int.Parse(Console.ReadLine());
int[] h = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
long[] dp = new long[n];
dp[0] = 0;
for (int i = 1; i < n; i++) {
dp[i] = (long)Math.Pow(10, 5)... | using System;
namespace ConsoleApp1 {
class Program {
static void Main(string[] args) {
int n = int.Parse(Console.ReadLine());
int[] h = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
long[] dp = new long[n];
dp[0] = 0;
for (int i = 1; i < n; i++) {
dp[i] = long.MaxValue;
... | [["-", 8, 196, 0, 1, 0, 11, 12, 74, 0, 24], ["-", 8, 196, 0, 1, 0, 11, 12, 74, 0, 25], ["-", 0, 11, 12, 74, 51, 213, 63, 214, 205, 22], ["-", 0, 11, 12, 74, 51, 213, 63, 214, 141, 22], ["-", 0, 11, 12, 74, 51, 213, 3, 4, 0, 24], ["-", 12, 74, 51, 213, 3, 4, 0, 28, 0, 203], ["-", 0, 11, 12, 74, 51, 213, 3, 4, 0, 21], ["... | 8 | 229 | 10 |
using System;
using System.Linq;
namespace ConsoleApp33 {
class Program {
static private int N;
static private int[] h;
static public int[] min;
public static void Main() {
GetData();
CalculateMin();
// Console.WriteLine(min.Last());
}
public static void GetData() {
N = int.Parse(Console.... | using System;
using System.Linq;
namespace ConsoleApp33 {
class Program {
static private int N;
static private int[] h;
static public int[] min;
public static void Main() {
GetData();
CalculateMin();
Console.WriteLine(min.Last());
}
public static void GetData() {
N = int.Parse(Console.Rea... | [["+", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["+", 8, 196, 0, 1, 0, 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], ["+", 3, 4, 0, 28, 0, 213, 63, 214, 141, 22], ... | 8 | 260 | 27 |
using System;
using System.Linq;
using static System.Console;
static class Extensions {
public static int ToInt(this string str) => int.Parse(str);
}
class Program {
public static void Main(string[] args) {
var n = ReadLine().ToInt();
var h = ReadLine().Split(' ').Select(int.Parse).ToArray();
var dp ... | using System;
using System.Linq;
using static System.Console;
static class Extensions {
public static int ToInt(this string str) => int.Parse(str);
}
class Program {
public static void Main(string[] args) {
var n = ReadLine().ToInt();
var h = ReadLine().Split(' ').Select(int.Parse).ToArray();
var dp ... | [["-", 31, 204, 206, 207, 0, 28, 0, 16, 12, 203], ["+", 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], ["+", 31, 204, 206, 207, 0, 28, 0, 16, 17, 33]] | 8 | 287 | 10 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
class MainClass {
public static void Main(string[] args) {
var N = int.Parse(Console.ReadLine());
var h = new int[N];
var input = Console.ReadLine().Split(' ');
// テーブル
var dp = new int[N];
for (v... | using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
class MainClass {
public static void Main(string[] args) {
var N = int.Parse(Console.ReadLine());
var h = new int[N];
var input = Console.ReadLine().Split(' ');
// テーブル
var dp = new int[N];
for (v... | [["+", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["+", 8, 196, 0, 1, 0, 213, 3, 4, 0, 24], ["+", 0, 213, 3, 4, 0, 28, 0, 204, 205, 22], ["+", 3, 4, 0, 28, 0, 204, 206, 207, 0, 70], ["+", 0, 204, 206, 207, 0, 28, 0, 16, 31, 22], ... | 8 | 316 | 12 |
using System;
using System.Linq;
// AtCoder Educational DP -A Frog
public class Program {
public static void Main() {
var len = int.Parse(Console.ReadLine());
var stage = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
var dp = new int[len];
dp[0] = 0;
dp[1] = stage[1];
int ... | using System;
using System.Linq;
// AtCoder Educational DP -A Frog
public class Program {
public static void Main() {
var len = int.Parse(Console.ReadLine());
var stage = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
var dp = new int[len];
dp[0] = 0;
dp[1] = Math.Abs(stage[1] -... | [["+", 0, 1, 0, 11, 12, 213, 63, 214, 205, 22], ["+", 0, 1, 0, 11, 12, 213, 63, 214, 0, 131], ["+", 0, 1, 0, 11, 12, 213, 63, 214, 141, 22], ["+", 0, 1, 0, 11, 12, 213, 3, 4, 0, 24], ["+", 0, 28, 0, 16, 31, 204, 206, 207, 0, 73], ["+", 12, 213, 3, 4, 0, 28, 0, 16, 17, 33], ["+", 3, 4, 0, 28, 0, 16, 12, 204, 205, 22], [... | 8 | 192 | 10 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
class Program {
static void Main(string[] args) { new Program().Calc(); }
Scanner cin;
public Program() {}
bool chmax<T>(ref T a, T b)
where T : IComparable<... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
class Program {
static void Main(string[] args) { new Program().Calc(); }
Scanner cin;
public Program() {}
bool chmax<T>(ref T a, T b)
where T : IComparable<... | [["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["+", 8, 196, 0, 57, 64, 196, 0, 57, 0, 121], ["+", 8, 196, 0, 57, 64, 196, 0, 57, 0, 24], ["+", 0, 57, 64, 196, 0, 57, 15, 16, 31, 22], ["+", 0, 57, 64, 196, 0, 57, 15, 16, 17, 20], ["+", 0, 57, 64, 196, 0, 57, 15, 16, 12, 203... | 8 | 755 | 10 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
using static System.Math;
namespace atcoder {
class Program {
static void Main(string[] args) {
while (args.Length > 0 && args[0] == "debug")
new Program().Solve(... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
using static System.Math;
namespace atcoder {
class Program {
static void Main(string[] args) {
// while (args.Length > 0 && args[0] == "debug")
new Program().Solve... | [["-", 8, 201, 0, 195, 8, 196, 0, 52, 0, 89], ["-", 8, 201, 0, 195, 8, 196, 0, 52, 0, 24], ["-", 0, 52, 15, 16, 31, 16, 31, 214, 205, 22], ["-", 0, 52, 15, 16, 31, 16, 31, 214, 0, 131], ["-", 0, 52, 15, 16, 31, 16, 31, 214, 141, 22], ["-", 8, 196, 0, 52, 15, 16, 31, 16, 17, 47], ["-", 8, 196, 0, 52, 15, 16, 31, 16, 12,... | 8 | 842 | 17 |
using System;
using System.Collections.Generic;
using System.Linq;
class Program {
public static void Main(string[] args) {
var N = int.Parse(Console.ReadLine());
var answer = new int[N];
// 配列を初期化
for (int i = 0; i < N; i++) {
answer[i] = 100000;
}
// スペース区切りの整数の入力
var input = Co... | using System;
using System.Collections.Generic;
using System.Linq;
class Program {
public static void Main(string[] args) {
var N = int.Parse(Console.ReadLine());
var answer = new int[N];
// 配列を初期化
for (int i = 0; i < N; i++) {
answer[i] = 100000;
}
// スペース区切りの整数の入力
var input = Co... | [["+", 0, 1, 0, 11, 12, 213, 63, 214, 205, 22], ["+", 0, 1, 0, 11, 12, 213, 63, 214, 0, 131], ["+", 0, 1, 0, 11, 12, 213, 63, 214, 141, 22], ["+", 0, 1, 0, 11, 12, 213, 3, 4, 0, 24], ["+", 0, 1, 0, 11, 12, 213, 3, 4, 0, 25], ["-", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["-", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["... | 8 | 241 | 13 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ABC88D {
class Program {
static void Main(string[] args) { EDPC.B_Frog2(); }
class EDPC {
public static void B_Frog2() {
var NK = ReadIntN();
int ... | using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ABC88D {
class Program {
static void Main(string[] args) { EDPC.B_Frog2(); }
class EDPC {
public static void B_Frog2() {
var NK = ReadIntN();
int ... | [["-", 0, 7, 8, 196, 0, 1, 0, 11, 12, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 74, 0, 24], ["+", 8, 196, 0, 1, 0, 11, 12, 74, 39, 199], ["+", 8, 196, 0, 1, 0, 11, 12, 74, 0, 25], ["+", 0, 11, 12, 74, 51, 213, 63, 214, 205, 22], ["+", 0, 11, 12, 74, 51, 213, 63, 214, 0, 131], ["+", 0, 11, 12, 74, 51, 213, 63, 214, 141, 22], ... | 8 | 985 | 12 |
using System;
namespace EDPC {
class B {
static void Main(string[] args) {
string[] input = Console.ReadLine().Split(' ');
int N = int.Parse(input[0]);
int K = int.Parse(input[1]);
input = Console.ReadLine().Split(' ');
// initialize
long[] h = new long[N];
for (int i = 0; i < N; i++) ... | using System;
using System.Linq;
namespace EDPC {
class B {
static void Main(string[] args) {
string[] input = Console.ReadLine().Split(' ');
int N = int.Parse(input[0]);
int K = int.Parse(input[1]);
input = Console.ReadLine().Split(' ');
// initialize
int[] h = new int[N];
for (int i ... | [["+", 36, 36, 36, 36, 0, 208, 0, 231, 0, 233], ["+", 36, 36, 0, 208, 0, 231, 141, 232, 234, 22], ["+", 36, 36, 0, 208, 0, 231, 141, 232, 0, 131], ["+", 36, 36, 0, 208, 0, 231, 141, 232, 141, 22], ["+", 36, 36, 36, 36, 0, 208, 0, 231, 0, 35], ["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198... | 8 | 262 | 52 |
using System;
namespace EDPC {
class B {
static void Main(string[] args) {
string[] input = Console.ReadLine().Split(' ');
int N = int.Parse(input[0]);
int K = int.Parse(input[1]);
input = Console.ReadLine().Split(' ');
// initialize
long[] h = new long[N];
for (int i = 0; i < N; i++) ... | using System;
using System.Linq;
namespace EDPC {
class B {
static void Main(string[] args) {
string[] input = Console.ReadLine().Split(' ');
int N = int.Parse(input[0]);
int K = int.Parse(input[1]);
input = Console.ReadLine().Split(' ');
// initialize
int[] h = new int[N];
for (int i ... | [["+", 36, 36, 36, 36, 0, 208, 0, 231, 0, 233], ["+", 36, 36, 0, 208, 0, 231, 141, 232, 234, 22], ["+", 36, 36, 0, 208, 0, 231, 141, 232, 0, 131], ["+", 36, 36, 0, 208, 0, 231, 141, 232, 141, 22], ["+", 36, 36, 36, 36, 0, 208, 0, 231, 0, 35], ["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198... | 8 | 262 | 52 |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
class Program {
#region library
static int n = 0;
static int m = 0;
static int r = 0;
static int c = 0;
static int x = 0;
static int y = 0;
static string s = "";
static string[] ss;
static long sum = 0;
static long ... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
class Program {
#region library
static int n = 0;
static int m = 0;
static int r = 0;
static int c = 0;
static int x = 0;
static int y = 0;
static string s = "";
static string[] ss;
static long sum = 0;
static long ... | [["-", 0, 227, 39, 224, 225, 226, 0, 16, 17, 72], ["-", 0, 227, 39, 224, 225, 226, 0, 16, 12, 203], ["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["-", 0, 11, 31, 204, 206, 207, 0, 28,... | 8 | 1,439 | 20 |
using System;
using System.Linq;
namespace atcoder {
class Program {
static void Main(string[] args) {
int[] input =
Console.ReadLine().Split(' ').Select(e => int.Parse(e)).ToArray();
int n = input[0];
int k = input[1];
int[] hArray =
Console.ReadLine().Split(' ').Select(e => int.Par... | using System;
using System.Linq;
namespace atcoder {
class Program {
static void Main(string[] args) {
int[] input =
Console.ReadLine().Split(' ').Select(e => int.Parse(e)).ToArray();
int n = input[0];
int k = input[1];
double[] hArray =
Console.ReadLine().Split(' ').Select(e => doub... | [["-", 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, 205, 199], ["+", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199], ["-", 63, 214, 205, 23, 0, 227, 39, 224, 39, 199], ["+", 63, 214, 205, 23, 0, 227, 39, 224, 39, 199], ["-", 205, 213, 3, 4,... | 8 | 234 | 14 |
using System;
using System.Linq;
public class Hello {
public static void Main() {
var input = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
var n = input[0];
var k = input[1];
var a = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
var dp = new long[n];
for (var i =... | using System;
using System.Linq;
using System.Collections.Generic;
public class Hello {
public static void Main() {
var input = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
var n = input[0];
var k = input[1];
var a = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
var dp... | [["+", 36, 36, 36, 36, 0, 208, 0, 231, 0, 233], ["+", 0, 208, 0, 231, 141, 232, 234, 232, 234, 22], ["+", 0, 208, 0, 231, 141, 232, 234, 232, 0, 131], ["+", 0, 208, 0, 231, 141, 232, 234, 232, 141, 22], ["+", 36, 36, 0, 208, 0, 231, 141, 232, 0, 131], ["+", 36, 36, 0, 208, 0, 231, 141, 232, 141, 22], ["+", 36, 36, 36, ... | 8 | 200 | 25 |
using System;
using System.Collections.Generic;
using System.IO;
class Program {
static void Main() {
string[] NK = Console.ReadLine().Split(' ');
int N = int.Parse(NK[0]);
int K = int.Parse(NK[1]);
string[] Input = Console.ReadLine().Split(' ');
int[] h = new int[N];
// DPテーブル
int[] dp... | using System;
using System.Collections.Generic;
using System.IO;
class Program {
static void Main() {
string[] NK = Console.ReadLine().Split(' ');
int N = int.Parse(NK[0]);
int K = int.Parse(NK[1]);
if (K > N)
K = N;
string[] Input = Console.ReadLine().Split(' ');
int[] h = new int[N];... | [["+", 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, 47], ["+", 0, 195, 8, 196, 0, 57, 15, 16, 12, 22], ["+", 8, 201, 0, 195, 8, 196, 0, 57, 0, 25], ["+", 8, 196, 0, 57, 64, 1, 0, 11, 31, 22], [... | 8 | 327 | 10 |
using System;
using System.Collections.Generic;
using System.Linq;
class Procon {
public Procon() {}
static void Main(string[] agrs) { new Procon().Do(); }
Scanner cin;
public void Do() {
cin = new Scanner();
int N = cin.nextInt();
int[,] abc = new int[N, 3];
int[,] DP = new int[N + 1, 3];
... | using System;
using System.Collections.Generic;
using System.Linq;
class Procon {
public Procon() {}
static void Main(string[] agrs) { new Procon().Do(); }
Scanner cin;
public void Do() {
cin = new Scanner();
int N = cin.nextInt();
int[,] abc = new int[N, 3];
int[,] DP = new int[N + 1, 3];
... | [["-", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["-", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["-", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["-", 8, 196, 0, 1, 0, 213, 3, 4, 0, 24], ["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 62], ["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["-", 8, 196, 0, 1, 0, 213, 3, 4, 0, 21], ["-", 0, 213... | 8 | 776 | 30 |
using System;
using System.Collections.Generic;
using System.Numerics;
using System.Linq;
using static System.Math;
class MainClass {
public static void Main(string[] args) {
var _ = LnInts();
var N = _[0];
var W = _[1];
var Vs = new int [N][];
for (var i = 0; i < N; i++) {
Vs[i] = LnInts(... | using System;
using System.Collections.Generic;
using System.Numerics;
using System.Linq;
using static System.Math;
class MainClass {
public static void Main(string[] args) {
var _ = LnInts();
var N = _[0];
var W = _[1];
var Vs = new long [N][];
for (var i = 0; i < N; i++) {
Vs[i] = LnLngs... | [["-", 0, 212, 0, 227, 39, 224, 39, 224, 39, 199], ["+", 0, 212, 0, 227, 39, 224, 39, 224, 39, 199], ["-", 8, 196, 0, 1, 0, 11, 12, 213, 63, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 213, 63, 22], ["-", 0, 1, 0, 11, 12, 227, 39, 224, 39, 199], ["+", 0, 1, 0, 11, 12, 227, 39, 224, 39, 199], ["-", 0, 7, 10, 198, 0, 200, 0, 212... | 8 | 720 | 26 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using static System.Console;
using static System.Math;
using System.Reflection;
namespace CP {
class Atria {
static void Main(string[] args) {
int[] nw = ReadLine().Split(' ').Select(int.Parse).ToArray();
i... | using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using static System.Console;
using static System.Math;
using System.Reflection;
namespace CP {
class Atria {
static void Main(string[] args) {
int[] nw = ReadLine().Split(' ').Select(int.Parse).ToArray();
i... | [["-", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["+", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["-", 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], ["-", 8, 201, 0, 263, 54, 5... | 8 | 350 | 26 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using static System.Console;
using static System.Math;
public class Hello {
static public int mod = 1000000007;
public static void Main() {
int[] num = inta();
int volume = num[1];
long[,] dp = new long[num[0] ... | using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using static System.Console;
using static System.Math;
public class Hello {
static public int mod = 1000000007;
public static void Main() {
int[] num = inta();
int volume = num[1];
long[,] dp = new long[num[0] ... | [["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 95], ["+", 0, 7, 8, 196, 0, 57, 75, 196, 0, 45], ["+", 75, 196, 0, 1, 0, 11, 31, 204, 205, 22], ["+", 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, 21], ["+", 0, 1, 0, 11, 31, 204, 206, 207, 0, 73], ... | 8 | 979 | 19 |
using System;
using System.Linq;
class DP {
static void Main(string[] args) {
var st = Console.ReadLine().Split().Select(long.Parse).ToArray();
long N = st[0];
long W = st[1];
var w = new long[N];
var v = new long[N];
for (int i = 0; i < N; i++) {
var x = Console.ReadLine().Split().Sele... | using System;
using System.Linq;
class DP {
static void Main(string[] args) {
var st = Console.ReadLine().Split().Select(long.Parse).ToArray();
long N = st[0];
long W = st[1];
var w = new long[N];
var v = new long[N];
for (int i = 0; i < N; i++) {
var x = Console.ReadLine().Split().Sele... | [["-", 8, 196, 0, 7, 8, 196, 0, 57, 0, 95], ["-", 0, 7, 8, 196, 0, 57, 75, 196, 0, 45], ["-", 75, 196, 0, 1, 0, 11, 31, 204, 205, 22], ["-", 0, 1, 0, 11, 31, 204, 206, 207, 0, 70], ["-", 0, 11, 31, 204, 206, 207, 0, 28, 0, 203], ["-", 0, 1, 0, 11, 31, 204, 206, 207, 0, 21], ["-", 0, 11, 31, 204, 206, 207, 0, 28, 0, 22]... | 8 | 441 | 12 |
using System;
namespace kozaiyApp {
public class EKnapsack2 {
static void Main() {
int ans = 0;
string[] input = Console.ReadLine().Split(' ');
int N = int.Parse(input[0]);
int Knapsack = int.Parse(input[1]);
long[] W = new long[N];
long[] V = new long[N];
int totalV = 0;
for (int i ... | using System;
namespace kozaiyApp {
public class EKnapsack2 {
static void Main() {
int ans = 0;
string[] input = Console.ReadLine().Split(' ');
int N = int.Parse(input[0]);
int Knapsack = int.Parse(input[1]);
long[] W = new long[N];
long[] V = new long[N];
int totalV = 0;
for (int i ... | [["+", 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], ["+", 8, 196, 0, 57, 15, 16, 12, 16, 12, 203], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 12, 203], ["+", 8, 196, 0, 57, 64, 196, 0, 1, 0, 35], ["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 46], ["+... | 8 | 357 | 22 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
namespace AtCorder {
public class Program {
static void Main(string[] args) {
var nw = Console.ReadLine().Split(' ').Select(int.Par... | using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
namespace AtCorder {
public class Program {
static void Main(string[] args) {
var nw = Console.ReadLine().Split(' ').Select(int.Par... | [["-", 8, 196, 0, 1, 0, 11, 12, 241, 0, 33], ["-", 8, 196, 0, 1, 0, 11, 12, 241, 0, 203], ["+", 8, 196, 0, 1, 0, 11, 12, 214, 205, 199], ["+", 8, 196, 0, 1, 0, 11, 12, 214, 0, 131], ["+", 8, 196, 0, 1, 0, 11, 12, 214, 141, 22], ["-", 8, 196, 0, 57, 15, 16, 12, 241, 0, 33], ["-", 8, 196, 0, 57, 15, 16, 12, 241, 0, 203],... | 8 | 473 | 19 |
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
class Program {
struct cell {
public long val;
public long weight;
public cell(long w, long v) {
val = v;
weight = w;
}
public static cell operator +(cell lhs, cell rhs) {
return new cel... | using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
class Program {
struct cell {
public long val;
public long weight;
public cell(long w, long v) {
val = v;
weight = w;
}
public static cell operator +(cell lhs, cell rhs) {
return new cel... | [["+", 0, 227, 39, 224, 225, 226, 0, 16, 17, 72], ["+", 0, 227, 39, 224, 225, 226, 0, 16, 12, 203], ["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19], ["-", 0, 7, 8, 196, 0, 7, 8, 196, 0, 4... | 8 | 569 | 38 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
namespace AtCorder {
public class Program {
static void Main(string[] args) {
string s = Console.ReadL... | using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
namespace AtCorder {
public class Program {
static void Main(string[] args) {
string s = Console.ReadL... | [["+", 31, 204, 206, 207, 0, 28, 0, 16, 17, 72], ["+", 31, 204, 206, 207, 0, 28, 0, 16, 12, 203], ["+", 0, 204, 206, 207, 0, 28, 0, 16, 17, 72], ["+", 0, 204, 206, 207, 0, 28, 0, 16, 12, 203]] | 8 | 356 | 12 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using System.Globalization;
namespace Atcoder {
class Program {
static void Main(string[] args) {
StreamScanner scan = new StreamScanner(System.Console.OpenStandardInput());
ch... | using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using System.Globalization;
namespace Atcoder {
class Program {
static void Main(string[] args) {
StreamScanner scan = new StreamScanner(System.Console.OpenStandardInput());
ch... | [["+", 8, 196, 0, 57, 75, 196, 0, 57, 0, 121], ["+", 8, 196, 0, 57, 75, 196, 0, 57, 0, 24], ["+", 75, 196, 0, 57, 15, 16, 31, 204, 205, 22], ["+", 0, 57, 15, 16, 31, 204, 206, 207, 0, 70], ["+", 31, 204, 206, 207, 0, 28, 0, 16, 31, 22], ["+", 31, 204, 206, 207, 0, 28, 0, 16, 17, 33], ["+", 31, 204, 206, 207, 0, 28, 0, ... | 8 | 1,315 | 26 |
// ReSharper disable ArrangeTypeMemberModifiers
// ReSharper disable ConvertIfStatementToSwitchStatement
// ReSharper disable FunctionRecursiveOnAllPaths
// ReSharper disable InconsistentNaming
// ReSharper disable InlineOutVariableDeclaration
// ReSharper disable InvertIf
// ReSharper disable JoinDeclarationAndInitial... | // ReSharper disable ArrangeTypeMemberModifiers
// ReSharper disable ConvertIfStatementToSwitchStatement
// ReSharper disable FunctionRecursiveOnAllPaths
// ReSharper disable InconsistentNaming
// ReSharper disable InlineOutVariableDeclaration
// ReSharper disable InvertIf
// ReSharper disable JoinDeclarationAndInitial... | [["-", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["-", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["-", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["-", 8, 196, 0, 1, 0, 213, 3, 4, 0, 24], ["-", 3, 4, 0, 28, 0, 204, 205, 204, 205, 22], ["-", 0, 28, 0, 204, 205, 204, 206, 207, 0, 70], ["-", 0, 204, 205, 204, 206, 207, 0, 28, ... | 8 | 1,881 | 13 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Competitive {
internal class Solution {
public int N;
public long MOD = 1000000007;
public string S, T;
public void Run() {
S = Console.ReadLine();
T = Console.ReadLine();
int[,] DP = new int[S.Length + 1... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Competitive {
internal class Solution {
public int N;
public long MOD = 1000000007;
public string S, T;
public void Run() {
S = Console.ReadLine();
T = Console.ReadLine();
int SL = S.Length;
int TL = ... | [["+", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["+", 0, 197, 0, 198, 0, 200, 0, 212, 0, 32], ["+", 0, 198, 0, 200, 0, 212, 0, 214, 205, 22], ["+", 0, 198, 0, 200, 0, 212, 0, 214, 0, 131], ["+", 0, 198, 0, 200, 0, 212, 0, 214, 141, 22], ["+", 8, 201, 0, 195, 8, 196, 0, 197, 0, 35], ["+", 0, 195, 8, 196, 0, 197, 0, 198... | 8 | 624 | 44 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using System.Globalization;
using System.Diagnostics;
class Myon {
public Myon() {}
public static int Main() {
new Myon().calc();
return 0;
}
Scanner cin;
void calc() {
... | using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using System.Globalization;
using System.Diagnostics;
class Myon {
public Myon() {}
public static int Main() {
new Myon().calc();
return 0;
}
Scanner cin;
void calc() {
... | [["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["-", 8, 196, 0, 7, 8, 196, 0, 57, 0, 121], ["-", 8, 196, 0, 7, 8, 196, 0, 57, 0, 24], ["-", 0, 7, 8, 196, 0, 57, 15, 16, 31, 22], ["-", 0, 7, 8, 196, 0, 57, 15, 16, 17, 79], ["-", 0, 7, 8, 196, 0, 57, 15, 16, 12, 203], ["-", 8... | 8 | 1,030 | 38 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using static System.Console;
using static System.Convert;
using static System.Math;
// using Debug;
// using static System.Globalization.CultureInfo;
using System.Text;
class Program {
static void Main(string[] args) {
var sw =
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using static System.Console;
using static System.Convert;
using static System.Math;
// using Debug;
// using static System.Globalization.CultureInfo;
using System.Text;
class Program {
static void Main(string[] args) {
var sw =
... | [["+", 8, 210, 8, 1, 0, 11, 12, 213, 63, 22], ["+", 8, 1, 0, 11, 12, 213, 3, 4, 0, 24], ["+", 12, 213, 3, 4, 0, 28, 0, 204, 205, 22], ["+", 3, 4, 0, 28, 0, 204, 206, 207, 0, 70], ["+", 0, 28, 0, 204, 206, 207, 0, 28, 0, 22], ["+", 3, 4, 0, 28, 0, 204, 206, 207, 0, 73], ["+", 8, 1, 0, 11, 12, 213, 3, 4, 0, 21], ["+", 8,... | 8 | 1,202 | 8 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ProgrammingContest {
class Writer : IDisposable {
private System.IO.TextWriter Out { get; }
private StringBuilder Sb { get; }
private bool IsReactive { get; }
public Writer(string path) : t... | using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ProgrammingContest {
class Writer : IDisposable {
private System.IO.TextWriter Out { get; }
private StringBuilder Sb { get; }
private bool IsReactive { get; }
public Writer(string path) : t... | [["-", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["-", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["-", 8, 196, 0, 1, 0, 213, 63, 214, 141, 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, 196, 0, 52, 8, 196, 0, 1, 0, 35]] | 8 | 2,454 | 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.