sample_id stringlengths 10 13 | problem_id stringlengths 4 7 | split stringclasses 3
values | language stringclasses 3
values | code stringlengths 55 11.6k | linter_messages listlengths 1 105 | linter_message_count int64 1 105 | original_loc int64 2 334 | compile_ok bool 2
classes | source stringclasses 3
values | title stringlengths 2 48 | generator stringlengths 295 8.27k | generator_cmd stringlengths 356 4.34k | checker stringlengths 774 8.9k | validator stringlengths 219 3.07k | revised_code stringlengths 0 9.22k | raw_response stringlengths 0 9.23k | tokens_used int64 0 7.43k | error stringclasses 1
value | extraction_ok bool 2
classes | revision_error stringclasses 1
value | pass_at_1 bool 2
classes | validation_error stringclasses 5
values | original_messages listlengths 1 105 | revised_messages listlengths 0 17 | metrics dict | validation dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1007_D_cpp_0 | 1007_D | test | cpp | #pragma comment(linker, "/STACK:102400000,102400000")
#include<bits/stdc++.h>
#define For(i,x,y) for (int i=x;i<y;i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define lf else if
#define Lsn (x<<1)
#define Rsn (x<<1|1)
#define Mid ((L+R)>>1)
#define dprintf(...) fprintf(stderr,__VA... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpgkze1g2t.cpp",
"line": 1,
"column": 17,
"severity": "warning",
"message_text": "'#pragma comment linker' ignored",
"check_name": "clang-diagnostic-ignored-pragmas",
"category": "other",
"message_identity": "clang-diagnostic-ignored-pragmas... | 55 | 284 | true | Codeforces | Ants | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
// Parse command line options.
int n = opt<int>("n");
int m = opt<int>("m");
string tree_type = opt<string>("tree_type", "random");
string case_type = opt<string>("... | # Small random tree with possible cases
./gen -n 10 -m 5 -tree_type random -case_type possible
./gen -n 10 -m 5 -tree_type chain -case_type possible
./gen -n 10 -m 5 -tree_type star -case_type possible
# Medium random tree with possible cases
./gen -n 100 -m 50 -tree_type random -case_type possible
./gen -n 100 -m 50 ... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
const int MAXM = 10005;
const int MAXLOG = 17; // since 2^17 > 1e5
int n, m;
vector<int> adj[MAXN];
int parent[MAXN][MAXLOG]; // parent[node][k] = 2^k-th ancestor of node
int depth[MAXN];
void dfs(int u, int p) {
parent[u... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(2, 100000, "n");
inf.readEoln();
vector<int> parent(n + 1);
for (int i = 1; i <= n; ++i) parent[i] = i;
function<int(int)> find = [&](int x... | #include <bits/stdc++.h>
#define For(i, x, y) for (int i = (x); i < (y); i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define lf else if
#define Lsn (x << 1)
#define Rsn (x << 1 | 1)
#define Mid ((L + R) >> 1)
#define dprintf(...) fprintf(stderr, __VA_ARGS__)
using namespace std;
... | ```cpp
#include <bits/stdc++.h>
#define For(i, x, y) for (int i = (x); i < (y); i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define lf else if
#define Lsn (x << 1)
#define Rsn (x << 1 | 1)
#define Mid ((L + R) >> 1)
#define dprintf(...) fprintf(stderr, __VA_ARGS__)
using namespac... | 7,428 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpgkze1g2t.cpp",
"line": 1,
"column": 17,
"severity": "warning",
"message_text": "'#pragma comment linker' ignored",
"check_name": "clang-diagnostic-ignored-pragmas",
"category": "other",
"message_identity": "clang-diagnostic-ignored-pragmas... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpb3607n2_.cpp",
"line": 3,
"column": 31,
"severity": "warning",
"message_text": "macro argument should be enclosed in parentheses",
"check_name": "bugprone-macro-parentheses",
"category": "bugprone",
"message_identity": "bugprone-macro-pare... | {
"original_total_messages": 55,
"revised_total_messages": 17,
"old_messages_remaining": 13,
"new_messages_count": 4,
"mrr_at_pass": 0.6909090909,
"new_msg_per_sample_at_pass": 4,
"line_churn_at_pass": 2.2775919732,
"original_loc": 299,
"revised_loc": 420,
"added_lines": 401,
"deleted_lines": 280,... | null |
1036_A_py3_0 | 1036_A | train | py3 | n,k = list(map(int, input().split(" ")))
print(max(n,k)//min(n,k) if max(n,k)%min(n,k)==0 else max(n,k)//min(n,k)+1) | [
{
"tool": "pylint",
"file": "/tmp/tmpoo6s9mac.py",
"line": 2,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
{... | 3 | 2 | true | Codeforces | Function Height | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
string type = opt<string>("type");
long long n, k;
if (type == "min_n_min_k") {
n = 1;
k = 1;
} else if (type == "min_n_max_k") {
n = 1;
k... | ./gen -type min_n_min_k
./gen -type min_n_max_k
./gen -type max_n_min_k
./gen -type max_n_max_k
./gen -type n_equals_k
./gen -type k_less_than_n
./gen -type k_greater_than_n
./gen -type k_divides_n
./gen -type k_does_not_divide_n
./gen -type random_small
./gen -type random_large
# Generate multiple random small test... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
long long n = inf.readLong(1LL, 1000000000000000000LL);
inf.readSpace();
long long k = inf.readLong(1LL, 1000000000000000000LL);
inf.readEoln();
inf.readEof();
... | n, k = list(map(int, input().split(" ")))
print(max(n, k) // min(n, k) if not max(n, k) % min(n, k) else max(n, k) // min(n, k) + 1) | n, k = list(map(int, input().split(" ")))
print(max(n, k) // min(n, k) if not max(n, k) % min(n, k) else max(n, k) // min(n, k) + 1) | 512 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmpoo6s9mac.py",
"line": 2,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
{... | [
{
"tool": "pylint",
"file": "/tmp/tmp3i0wad2n.py",
"line": 2,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
{... | {
"original_total_messages": 3,
"revised_total_messages": 2,
"old_messages_remaining": 2,
"new_messages_count": 0,
"mrr_at_pass": 0.3333333333,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 2,
"original_loc": 2,
"revised_loc": 2,
"added_lines": 2,
"deleted_lines": 2,
"category_mrr": {
... | null |
1045_F_cpp_0 | 1045_F | train | cpp | #include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
x = 0;
register char c = getchar();
register bool f = 0;
while (!isdigit(c)) f ^= c == '-', c = getchar();
while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
if (f) x = -x;
}
const int N = 2e5 + 10;
struct node {
... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpd5cn2dbl.cpp",
"line": 6,
"column": 3,
"severity": "error",
"message_text": "ISO C++17 does not allow 'register' storage class specifier",
"check_name": "clang-diagnostic-register",
"category": "other",
"message_identity": "clang-diagnosti... | 21 | 69 | true | Codeforces | Shady Lady | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
vector<pair<int, int>> monomials(n);
if (type == "random") {
set<pair<int, int>> monomial_... | ./gen -n 1 -type single_constant
./gen -n 2 -type one_constant_rest_random
./gen -n 100 -type one_constant_rest_random
./gen -n 1000 -type one_constant_rest_random
./gen -n 100000 -type one_constant_rest_random
./gen -n 1 -type only_x
./gen -n 10 -type only_x
./gen -n 1000 -type only_x
./gen -n 100000 -type only_x
.... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare sequences of tokens");
registerTestlibCmd(argc, argv);
int n = 0;
string j, p;
while (!ans.seekEof() && !ouf.seekEof()) {
n++;
ans.readWordTo(j);
ouf.readWordTo(p... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(2, 200000, "N");
inf.readEoln();
set<pair<int, int>> monomials;
for (int i = 0; i < N; i++) {
int a_k = inf.readInt(0, 1000000000, "a_k"... | #include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
x = 0;
char c = getchar();
bool f = 0;
while (!isdigit(c)) {
f ^= c == '-';
c = getchar();
}
while (isdigit(c)) {
x = x * 10 + c - '0';
c = getchar();
}
if (f) x = -x;
}
const int N = 2e5 + 10;
stru... | ```cpp
#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
x = 0;
char c = getchar();
bool f = 0;
while (!isdigit(c)) {
f ^= c == '-';
c = getchar();
}
while (isdigit(c)) {
x = x * 10 + c - '0';
c = getchar();
}
if (f) x = -x;
}
const int N = 2e5 + 1... | 2,441 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpd5cn2dbl.cpp",
"line": 6,
"column": 3,
"severity": "error",
"message_text": "ISO C++17 does not allow 'register' storage class specifier",
"check_name": "clang-diagnostic-register",
"category": "other",
"message_identity": "clang-diagnosti... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpzxxecfw6.cpp",
"line": 6,
"column": 12,
"severity": "warning",
"message_text": "narrowing conversion from 'int' to signed type 'char' is implementation-defined",
"check_name": "bugprone-narrowing-conversions",
"category": "bugprone",
"mess... | {
"original_total_messages": 21,
"revised_total_messages": 10,
"old_messages_remaining": 10,
"new_messages_count": 0,
"mrr_at_pass": 0.5238095238,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.7391304348,
"original_loc": 69,
"revised_loc": 82,
"added_lines": 32,
"deleted_lines": 19,
"... | null |
106_C_cpp_0 | 106_C | train | cpp | #include <bits/stdc++.h>
using namespace std;
int dp[11][1004], a[102], b[102], c[102], d[102];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n, m, c0, d0;
cin >> n >> m >> c0 >> d0;
for (int i = 0; i < m; i++) cin >> a[i] >> b[i] >> c[i] >> d[i];
for (int pos = 0; pos < m; pos++... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpxq7jftlj.cpp",
"line": 6,
"column": 11,
"severity": "warning",
"message_text": "use nullptr",
"check_name": "modernize-use-nullptr",
"category": "modernize",
"message_identity": "modernize-use-nullptr::use nullptr"
},
{
"tool": "cl... | 7 | 23 | true | Codeforces | Buns | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int m = opt<int>("m");
string type = opt<string>("type", "random");
int c0, d0; // Plain bun dough and price
vector<int> ai(m), bi(m), ci(m)... | ./gen -n 10 -m 5 -type random
./gen -n 1 -m 3 -type minimal_dough
./gen -n 1000 -m 10 -type max_dough
./gen -n 500 -m 5 -type zero_stuffings
./gen -n 100 -m 4 -type cannot_make_any_bun
./gen -n 100 -m 4 -type plain_buns_better
./gen -n 100 -m 4 -type stuffed_buns_better
./gen -n 100 -m 10 -type zero_stuffings
./gen -n ... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
// Read n, m, c0, d0 from the first line
int n = inf.readInt(1, 1000, "n"); // 1 ≤ n ≤ 1000
inf.readSpace();
int m = inf.readInt(1, 10, "m"); // 1 ≤ m ≤ 10
... | #include <bits/stdc++.h>
using namespace std;
int dp[11][1004], a[102], b[102], c[102], d[102];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int n, m, c0, d0;
cin >> n >> m >> c0 >> d0;
for (int i = 0; i < m; i++) {
cin >> a[i] >> b[i] >> c[i] >> d[i];
}
for (i... | ```cpp
#include <bits/stdc++.h>
using namespace std;
int dp[11][1004], a[102], b[102], c[102], d[102];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int n, m, c0, d0;
cin >> n >> m >> c0 >> d0;
for (int i = 0; i < m; i++) {
cin >> a[i] >> b[i] >> c[i] >> d[i];
}
... | 1,047 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpxq7jftlj.cpp",
"line": 6,
"column": 11,
"severity": "warning",
"message_text": "use nullptr",
"check_name": "modernize-use-nullptr",
"category": "modernize",
"message_identity": "modernize-use-nullptr::use nullptr"
},
{
"tool": "cl... | [] | {
"original_total_messages": 7,
"revised_total_messages": 0,
"old_messages_remaining": 0,
"new_messages_count": 0,
"mrr_at_pass": 1,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 1,
"original_loc": 23,
"revised_loc": 28,
"added_lines": 14,
"deleted_lines": 9,
"category_mrr": {
"perf... | null |
1132_C_py3_0 | 1132_C | train | py3 | #---------------------------iye ha aam zindegi---------------------------------------------
import math
import heapq,bisect
import sys
from collections import deque,defaultdict
from fractions import Fraction
mod=10**9+7
mod1=998244353
# ------------------------------warmup----------------------------
import os
import s... | [
{
"tool": "pylint",
"file": "/tmp/tmpk9531zh2.py",
"line": 237,
"column": 0,
"severity": "warning",
"message_text": "Line too long (102/100)",
"check_name": "line-too-long",
"category": "readability",
"message_identity": "line-too-long::Line too long (102/100)"
},
{
"tool... | 105 | 332 | false | Codeforces | Painting the Fence | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
// Read parameters
int n = opt<int>("n", 0); // number of sections
int q = opt<int>("q", 0); // number of painters
string type = opt<string>("type", "random");
//... | # Minimal size test cases
./gen -n 3 -q 3 -type min
./gen -n 3 -q 5 -type min
# Maximal size test cases
./gen -n 5000 -q 5000 -type max
./gen -n 5000 -q 4999 -type max
# Random test cases
./gen -type random
./gen -n 1000 -q 2000 -type random
./gen -n 3000 -q 3000 -type random
./gen -n 5000 -q 5000 -type random
# Ful... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(3, 5000, "n");
inf.readSpace();
int q = inf.readInt(3, 5000, "q");
inf.readEoln();
for (int i = 0; i < q; ++i) {
int l_i = inf.readIn... | 0 | all_retries_exhausted: API_connection_error: Request timed out. | false | all_retries_exhausted: API_connection_error: Request timed out. | false | empty | [
{
"tool": "pylint",
"file": "/tmp/tmpk9531zh2.py",
"line": 237,
"column": 0,
"severity": "warning",
"message_text": "Line too long (102/100)",
"check_name": "line-too-long",
"category": "readability",
"message_identity": "line-too-long::Line too long (102/100)"
},
{
"tool... | [] | null | null | ||
1152_B_cpp_0 | 1152_B | valid | cpp | #include <bits/stdc++.h>
#pragma comment(linker, "/STACK:10000000000")
using namespace std;
signed main() {
long long n;
cin >> n;
if (n == 39) {
cout << 4 << " " << 5 << " " << 3 << endl;
return 0;
}
if (n == 1 || n == 7) {
cout << 0 << endl;
return 0;
}
if (n <= 100) {
long long y = ... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpp7spxyu0.cpp",
"line": 2,
"column": 17,
"severity": "warning",
"message_text": "'#pragma comment linker' ignored",
"check_name": "clang-diagnostic-ignored-pragmas",
"category": "other",
"message_identity": "clang-diagnostic-ignored-pragmas... | 16 | 60 | true | Codeforces | Neko Performs Cat Furrier Transform | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int maxn = opt<int>("maxn", 1000000);
string type = opt<string>("type", "random");
int x = 1;
if (type == "already_perfect") {
// x = 2^m - 1
int m = r... | ./gen -type min_value # x = 1
./gen -type random -maxn 10
./gen -type small_random
./gen -type small_random
./gen -type random -maxn 100
./gen -type random -maxn 1000
./gen -type random -maxn 10000
./gen -type random -maxn 100000
./gen -type random -maxn 1000000
./gen -type large_random
./gen -type larg... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
bool isPowerOfTwo(long long n) {
return n > 0 && (n & (n - 1)) == 0;
}
int main(int argc, char* argv[]) {
registerTestlibCmd(argc, argv);
int x = inf.readInt(1, 1000000, "x");
long long x_curr = x;
int t = ouf.readInt(0, 40, "t");... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int x = inf.readInt(1, 1000000, "x");
inf.readEoln();
inf.readEof();
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
signed main() {
long long n;
cin >> n;
if (n == 39) {
cout << 4 << " " << 5 << " " << 3 << '\n';
return 0;
}
if (n == 1 || n == 7) {
cout << 0 << '\n';
return 0;
}
if (n <= 100) {
// This block appears to... | ```cpp
#include <bits/stdc++.h>
using namespace std;
signed main() {
long long n;
cin >> n;
if (n == 39) {
cout << 4 << " " << 5 << " " << 3 << '\n';
return 0;
}
if (n == 1 || n == 7) {
cout << 0 << '\n';
return 0;
}
if (n <= 100) {
// This block app... | 1,865 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpp7spxyu0.cpp",
"line": 2,
"column": 17,
"severity": "warning",
"message_text": "'#pragma comment linker' ignored",
"check_name": "clang-diagnostic-ignored-pragmas",
"category": "other",
"message_identity": "clang-diagnostic-ignored-pragmas... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp11r2q8g6.cpp",
"line": 56,
"column": 13,
"severity": "warning",
"message_text": "use range-based for loop instead",
"check_name": "modernize-loop-convert",
"category": "modernize",
"message_identity": "modernize-loop-convert::use range-bas... | {
"original_total_messages": 16,
"revised_total_messages": 2,
"old_messages_remaining": 2,
"new_messages_count": 0,
"mrr_at_pass": 0.875,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 1.9833333333,
"original_loc": 60,
"revised_loc": 73,
"added_lines": 66,
"deleted_lines": 53,
"category_... | null |
1162_E_py3_0 | 1162_E | valid | py3 | n = int(input())
ar = list(map(int, input().split()))
print("Alice" if ar.count(min(ar)) <= n//2 else "Bob") | [
{
"tool": "pylint",
"file": "/tmp/tmpjomrsvx_.py",
"line": 4,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
{... | 2 | 3 | true | Codeforces | Thanos Nim | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
ensuref(n >= 2 && n <= 50 && n % 2 == 0, "n must be an even integer between 2 and 50 inclusive");
string type = opt<string>("type", "random");
... | ./gen -n 2 -type min
./gen -n 2 -type max
./gen -n 2 -type same
./gen -n 2 -type random
./gen -n 2 -type win
./gen -n 2 -type lose
./gen -n 4 -type min
./gen -n 4 -type max
./gen -n 4 -type same
./gen -n 4 -type random
./gen -n 4 -type alternate
./gen -n 4 -type win
./gen -n 4 -type lose
./gen -n 6 -type random
./gen... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare sequences of tokens");
registerTestlibCmd(argc, argv);
int n = 0;
string j, p;
while (!ans.seekEof() && !ouf.seekEof()) {
n++;
ans.readWordTo(j);
ouf.readWordTo(p... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(2, 50, "n");
inf.readEoln();
ensuref(n % 2 == 0, "n must be even, but n=%d", n);
vector<int> a = inf.readInts(n, 1, 50, "a_i");
inf.readEol... | n = int(input())
ar = list(map(int, input().split()))
print("Alice" if ar.count(min(ar)) <= n//2 else "Bob") | n = int(input())
ar = list(map(int, input().split()))
print("Alice" if ar.count(min(ar)) <= n//2 else "Bob") | 416 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmpjomrsvx_.py",
"line": 4,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
{... | [
{
"tool": "pylint",
"file": "/tmp/tmp_avaper1.py",
"line": 4,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
{... | {
"original_total_messages": 2,
"revised_total_messages": 2,
"old_messages_remaining": 2,
"new_messages_count": 0,
"mrr_at_pass": 0,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0,
"original_loc": 4,
"revised_loc": 4,
"added_lines": 0,
"deleted_lines": 0,
"category_mrr": {
"readabi... | null |
1191_D_java_0 | 1191_D | test | java | import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
public class Main {
static PrintWriter out;
static InputReader ir;
static void solve() {
int n = ir.nextInt();
long[] a... | [
{
"tool": "pmd",
"file": "/tmp/tmpx4zr9xgz.java",
"line": 10,
"column": 21,
"severity": "warning",
"message_text": "Do not use non-final non-private static fields",
"check_name": "MutableStaticState",
"category": "modernize",
"message_identity": "MutableStaticState::Do not use no... | 35 | 162 | false | Codeforces | Tokitsukaze, CSL and Stone Game | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
vector<long long> a(n);
if (type == "random") {
for (int i = 0; i < n; ++i) {
a... | ./gen -n 1 -type all_zero
./gen -n 1 -type random
./gen -n 2 -type duplicates
./gen -n 2 -type random
./gen -n 3 -type all_same -k 0
./gen -n 3 -type all_same -k 1
./gen -n 3 -type random
./gen -n 5 -type unique
./gen -n 5 -type duplicates
./gen -n 5 -type random
./gen -n 10 -type sequence
./gen -n 10 -type reverse... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare sequences of tokens");
registerTestlibCmd(argc, argv);
int n = 0;
string j, p;
while (!ans.seekEof() && !ouf.seekEof()) {
n++;
ans.readWordTo(j);
ouf.readWordTo(p... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 100000, "n");
inf.readEoln();
inf.readInts(n, 0, 1000000000, "a_i");
inf.readEoln();
inf.readEof();
return 0;
}
| import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
public class Main {
private static PrintWriter out;
private static InputReader ir;
private static void solve() {
... | ```java
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
public class Main {
private static PrintWriter out;
private static InputReader ir;
private static void sol... | 3,595 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpx4zr9xgz.java",
"line": 10,
"column": 21,
"severity": "warning",
"message_text": "Do not use non-final non-private static fields",
"check_name": "MutableStaticState",
"category": "modernize",
"message_identity": "MutableStaticState::Do not use no... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
1197_A_java_0 | 1197_A | test | java | import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.Random;
public class Main
{
InputStream is;
PrintWriter out;
String INPUT = "";
void solve()
{
for(int T =... | [
{
"tool": "pmd",
"file": "/tmp/tmpvbo89vh6.java",
"line": 9,
"column": 8,
"severity": "warning",
"message_text": "Each class should declare at least one constructor",
"check_name": "AtLeastOneConstructor",
"category": "readability",
"message_identity": "AtLeastOneConstructor::Eac... | 39 | 140 | false | Codeforces | DIY Wooden Ladder | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int T = opt<int>("T");
int n = opt<int>("n");
string type = opt<string>("type", "random");
// Ensure T is within the problem constraints
T = min(T, 100);
// ... | ./gen -T 5 -n 20000 -type random
./gen -T 10 -n 10000 -type random
./gen -T 20 -n 5000 -type random
./gen -T 50 -n 2000 -type random
./gen -T 100 -n 1000 -type random
./gen -T 1 -n 100000 -type all_min_length
./gen -T 2 -n 50000 -type all_min_length
./gen -T 4 -n 25000 -type all_min_length
./gen -T 10 -n 10000 -type a... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int T = inf.readInt(1, 100, "T");
inf.readEoln();
int total_n = 0;
for (int t = 0; t < T; t++) {
int n = inf.readInt(2, 100000, "n");
total_n += n;
... | import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.Random;
public class Main {
private InputStream is;
private PrintWriter out;
private String input = "";... | ```java
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.Random;
public class Main {
private InputStream is;
private PrintWriter out;
private String inp... | 3,204 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpvbo89vh6.java",
"line": 9,
"column": 8,
"severity": "warning",
"message_text": "Each class should declare at least one constructor",
"check_name": "AtLeastOneConstructor",
"category": "readability",
"message_identity": "AtLeastOneConstructor::Eac... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
119_C_py3_0 | 119_C | test | py3 | class Subject:
def __init__(self, id, low, high, complexity):
self.id = id
self.low = low
self.high = high
self.complexity = complexity
self.day_links = [ {} for i in range(high - low + 1) ]
def add_link(self, link):
days = link.days
links = self.day_link... | [
{
"tool": "pylint",
"file": "/tmp/tmp5wa1fp9k.py",
"line": 97,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | 25 | 84 | true | Codeforces | Education Reform | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int m = opt<int>("m");
int k = opt<int>("k");
string type = opt<string>("type", "random");
ensure(1 <= n && n <= m && m <= 50);
ensure(... | # Minimal input values
./gen -n 1 -m 1 -k 1 -type random
./gen -n 1 -m 1 -k 1 -type min_ai_bi
# Maximal input values
./gen -n 50 -m 50 -k 100 -type random
./gen -n 50 -m 50 -k 100 -type max_ai_bi
# Random test cases with varying n, m, k
./gen -n 10 -m 15 -k 5 -type random
./gen -n 20 -m 25 -k 10 -type random
./gen -n... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
long long readAnswer(InStream& stream, int n, int m, int k, const vector<long long>& a, const vector<long long>& b, const vector<int>& c) {
// Read the verdict
string verdict = stream.readToken();
if (verdict != "YES" && verdict != "NO")
... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 50, "n");
inf.readSpace();
int m = inf.readInt(n, 50, "m");
inf.readSpace();
int k = inf.readInt(1, 100, "k");
inf.readEoln();
fo... | class Subject:
def __init__(self, subject_id, low, high, complexity):
self.id = subject_id
self.low = low
self.high = high
self.complexity = complexity
self.day_links = [ {} for _ in range(high - low + 1) ]
def add_link(self, link_obj):
days_val = link_obj.days
... | class Subject:
def __init__(self, subject_id, low, high, complexity):
self.id = subject_id
self.low = low
self.high = high
self.complexity = complexity
self.day_links = [ {} for _ in range(high - low + 1) ]
def add_link(self, link_obj):
days_val = link_obj.days
... | 2,492 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmp5wa1fp9k.py",
"line": 97,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | [
{
"tool": "pylint",
"file": "/tmp/tmpbbtb5vc3.py",
"line": 93,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 25,
"revised_total_messages": 16,
"old_messages_remaining": 12,
"new_messages_count": 4,
"mrr_at_pass": 0.36,
"new_msg_per_sample_at_pass": 4,
"line_churn_at_pass": 0.9072164948,
"original_loc": 97,
"revised_loc": 93,
"added_lines": 42,
"deleted_lines": 46,
"category... | null |
1270_E_py3_0 | 1270_E | valid | py3 | n = int(input())
points=[]
for i in range(n):
x, y = map(int,input().split())
points.append([x,y])
dic = {}
for i in range(n):
x , y = points[i]
singularity = (x+y)%2
if singularity not in dic:
dic[singularity] = []
dic[singularity].append(i+1)
if len(dic)==2:
print(len(dic[0]))
... | [
{
"tool": "pylint",
"file": "/tmp/tmp97lyxarn.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Missing module docstring",
"check_name": "missing-module-docstring",
"category": "readability",
"message_identity": "missing-module-docstring::Missing module docstri... | 2 | 28 | true | Codeforces | Divide Points | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
set<pair<int, int>> point_set;
vector<pair<int, int>> points;
if (type == "random") {
... | ./gen -n 2 -type random
./gen -n 2 -type line
./gen -n 2 -type grid
./gen -n 2 -type circle
./gen -n 2 -type same_distance
./gen -n 2 -type max_distance
./gen -n 2 -type min_distance
./gen -n 10 -type random
./gen -n 10 -type line
./gen -n 10 -type grid
./gen -n 10 -type circle
./gen -n 10 -type same_distance
./gen -n... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerTestlibCmd(argc, argv);
// Read input data from 'inf'
int n = inf.readInt(2, 1000, "n");
vector<pair<int, int>> points(n);
for (int i = 0; i < n; ++i) {
int x = inf.readInt(-10... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(2, 1000, "n");
inf.readEoln();
set<pair<int, int>> points;
for (int i = 0; i < n; ++i) {
int x = inf.readInt(-1000000, 1000000, "x_i")... | n = int(input())
points = []
for _ in range(n):
x, y = map(int, input().split())
points.append([x, y])
dic = {}
for i in range(n):
x, y = points[i]
singularity = (x + y) % 2
if singularity not in dic:
dic[singularity] = []
dic[singularity].append(i + 1)
if len(dic) == 2:
print(len(di... | n = int(input())
points = []
for _ in range(n):
x, y = map(int, input().split())
points.append([x, y])
dic = {}
for i in range(n):
x, y = points[i]
singularity = (x + y) % 2
if singularity not in dic:
dic[singularity] = []
dic[singularity].append(i + 1)
if len(dic) == 2:
print(len(di... | 872 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmp97lyxarn.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Missing module docstring",
"check_name": "missing-module-docstring",
"category": "readability",
"message_identity": "missing-module-docstring::Missing module docstri... | [
{
"tool": "pylint",
"file": "/tmp/tmpcdlxng9a.py",
"line": 28,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 2,
"revised_total_messages": 2,
"old_messages_remaining": 1,
"new_messages_count": 1,
"mrr_at_pass": 0,
"new_msg_per_sample_at_pass": 1,
"line_churn_at_pass": 0.9310344828,
"original_loc": 29,
"revised_loc": 28,
"added_lines": 13,
"deleted_lines": 14,
"category_mrr":... | null |
1285_D_py3_0 | 1285_D | test | py3 | n = int(input())
a = [int(x) for x in input().split(" ")]
a.sort()
b = pow(2, 30)
while (a[n-1] % b) == a[n - 1]:
b /= 2
b = int(b)
a.sort()
def sol(nums, lo, hi, bit):
bit = int(bit)
if bit < 1:
return nums[lo] % 2, 0
if hi - lo == 0:
return nums[lo] % (bit * 2), 0
ind = lo
... | [
{
"tool": "pylint",
"file": "/tmp/tmpdd9xb1e3.py",
"line": 45,
"column": 0,
"severity": "warning",
"message_text": "Trailing newlines",
"check_name": "trailing-newlines",
"category": "readability",
"message_identity": "trailing-newlines::Trailing newlines"
},
{
"tool": "p... | 6 | 32 | true | Codeforces | Dr | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
const int MAX_A = (1 << 30) - 1;
vector<int> a(n);
if (type == "random") {
... | ./gen -n 1 -type zeros
./gen -n 1 -type random
./gen -n 2 -type zeros
./gen -n 2 -type max
./gen -n 2 -type same
./gen -n 3 -type same
./gen -n 5 -type sequence
./gen -n 10 -type random
./gen -n 10 -type powers
./gen -n 10 -type highbits
./gen -n 100 -type random
./gen -n 100 -type zeros
./gen -n 100 -type max
./gen -n... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 100000, "n");
inf.readEoln();
vector<int> a = inf.readInts(n, 0, 1073741823, "a_i");
inf.readEoln();
inf.readEof();
return 0;
}
| n = int(input())
a = [int(x) for x in input().split()]
a.sort()
b = pow(2, 30)
while (a[n-1] % b) == a[n - 1]:
b /= 2
b = int(b)
a.sort()
def sol(nums, lo, hi, bit):
bit = int(bit)
if bit < 1:
return nums[lo] % 2, 0
if hi - lo == 0:
return nums[lo] % (bit * 2), 0
ind = lo
w... | n = int(input())
a = [int(x) for x in input().split()]
a.sort()
b = pow(2, 30)
while (a[n-1] % b) == a[n - 1]:
b /= 2
b = int(b)
a.sort()
def sol(nums, lo, hi, bit):
bit = int(bit)
if bit < 1:
return nums[lo] % 2, 0
if hi - lo == 0:
return nums[lo] % (bit * 2), 0
ind = lo
w... | 1,144 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmpdd9xb1e3.py",
"line": 45,
"column": 0,
"severity": "warning",
"message_text": "Trailing newlines",
"check_name": "trailing-newlines",
"category": "readability",
"message_identity": "trailing-newlines::Trailing newlines"
},
{
"tool": "p... | [
{
"tool": "pylint",
"file": "/tmp/tmppxxo46ic.py",
"line": 41,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 6,
"revised_total_messages": 4,
"old_messages_remaining": 3,
"new_messages_count": 1,
"mrr_at_pass": 0.3333333333,
"new_msg_per_sample_at_pass": 1,
"line_churn_at_pass": 0.4888888889,
"original_loc": 45,
"revised_loc": 41,
"added_lines": 9,
"deleted_lines": 13,
"cate... | null |
1295_D_cpp_0 | 1295_D | train | cpp | #include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
if (a < 0) return gcd(-a, b);
if (b < 0) return gcd(a, -b);
return (b == 0) ? a : gcd(b, a % b);
}
long long ar[1000100];
vector<long long> prime;
void seive() {
ar[0] = ar[1] = 1;
for (long long i = 2; i * i < 1000100; i++)... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpag_4jqtn.cpp",
"line": 5,
"column": 13,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-ar... | 7 | 53 | true | Codeforces | Same GCDs | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int T = opt<int>("T", 50); // default to 50
string type = opt<string>("type", "random");
printf("%d\n", T);
for (int t = 0; t < T; ++t) {
... | ./gen -type random_small
./gen -type random_large
./gen -type coprime
./gen -type common_divisor
./gen -type a_divides_m
./gen -type max_values
./gen -type min_values
./gen -type a_equals_1
./gen -type m_prime
./gen -type near_equal
./gen -type random_small -T 5
./gen -type random_large -T 5
./gen -type coprime -T 5
.... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
const long long MAX_A_M = 10000000000LL; // 1e10
int T = inf.readInt(1, 50, "T");
inf.readEoln();
for (int tc = 0; tc < T; ++tc) {
long long a = inf.readLon... | #include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
if (a < 0) {
return gcd(-a, b);
}
if (b < 0) {
return gcd(a, -b);
}
return (b == 0) ? a : gcd(b, a % b);
}
long long ar[1000100];
vector<long long> prime;
void seive() {
ar[0] = ar[1] = 1;
for (long long i = 2; i... | ```cpp
#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
if (a < 0) {
return gcd(-a, b);
}
if (b < 0) {
return gcd(a, -b);
}
return (b == 0) ? a : gcd(b, a % b);
}
long long ar[1000100];
vector<long long> prime;
void seive() {
ar[0] = ar[1] = 1;
for (long long i... | 1,376 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpag_4jqtn.cpp",
"line": 5,
"column": 13,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-ar... | [] | {
"original_total_messages": 7,
"revised_total_messages": 0,
"old_messages_remaining": 0,
"new_messages_count": 0,
"mrr_at_pass": 1,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.4905660377,
"original_loc": 53,
"revised_loc": 61,
"added_lines": 17,
"deleted_lines": 9,
"category_mrr": ... | null |
1313_C1_cpp_0 | 1313_C1 | test | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
long long int i, j, n;
cin >> n;
vector<long long int> ar(n);
vector<long long int> ar1(n);
for (i = 0; i < n; i++) {
cin >> ar[i];
ar1[i] = ar[i];
}
map<long long int, long long... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpuakcf27e.cpp",
"line": 5,
"column": 11,
"severity": "warning",
"message_text": "use nullptr",
"check_name": "modernize-use-nullptr",
"category": "modernize",
"message_identity": "modernize-use-nullptr::use nullptr"
},
{
"tool": "cl... | 6 | 105 | true | Codeforces | Skyscrapers (easy version) | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
int max_m = opt<int>("max_m", 1000000000);
int min_m = opt<int>("min_m", 1);
assert(1 <=... | ./gen -n 1 -type random
./gen -n 1 -type min_limits
./gen -n 1 -type max_limits
./gen -n 2 -type random
./gen -n 2 -type same -value 5
./gen -n 5 -type increasing
./gen -n 5 -type decreasing
./gen -n 5 -type hill
./gen -n 5 -type valley
./gen -n 10 -type random
./gen -n 10 -type same -value 1
./gen -n 10 -ty... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1005;
long long m[MAXN];
long long jury_a[MAXN];
long long part_a[MAXN];
long long left_max[MAXN];
long long right_max[MAXN];
int main(int argc, char* argv[]) {
registerTestlibCmd(argc, argv);
int n = inf.readInt(1, 1000, "n")... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 1000, "n");
inf.readEoln();
vector<int> m = inf.readInts(n, 1, 1000000000, "m_i");
inf.readEoln();
inf.readEof();
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
long long int i, j, n;
cin >> n;
vector<long long int> ar(n);
vector<long long int> ar1(n);
for (i = 0; i < n; i++) {
cin >> ar[i];
ar1[i] = ar[i];
}
map<long lon... | ```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
long long int i, j, n;
cin >> n;
vector<long long int> ar(n);
vector<long long int> ar1(n);
for (i = 0; i < n; i++) {
cin >> ar[i];
ar1[i] = ar[i];
}
map<l... | 2,350 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpuakcf27e.cpp",
"line": 5,
"column": 11,
"severity": "warning",
"message_text": "use nullptr",
"check_name": "modernize-use-nullptr",
"category": "modernize",
"message_identity": "modernize-use-nullptr::use nullptr"
},
{
"tool": "cl... | [] | {
"original_total_messages": 6,
"revised_total_messages": 0,
"old_messages_remaining": 0,
"new_messages_count": 0,
"mrr_at_pass": 1,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.2666666667,
"original_loc": 105,
"revised_loc": 113,
"added_lines": 18,
"deleted_lines": 10,
"category_mrr... | null |
1323_A_cpp_0 | 1323_A | valid | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int arr[100];
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
int i;
int sum = 0;
bool flag = false;
for (i = 0; i < n; i++) {
sum += arr[i];
if (sum % 2 ... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmputnalqn_.cpp",
"line": 21,
"column": 13,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-a... | 4 | 34 | true | Codeforces | Even Subset Sum Problem | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int t = opt<int>("t", 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
// Generate t test cases
printf("%d\n", t);
while (t--) {
... | ./gen -t 10 -n 100 -type random
./gen -t 10 -n 100 -type all_even
./gen -t 10 -n 100 -type all_odd
./gen -t 1 -n 1 -type single_element_even
./gen -t 1 -n 1 -type single_element_odd
./gen -t 5 -n 50 -type all_same_even
./gen -t 5 -n 50 -type all_same_odd
./gen -t 10 -n 100 -type max_size_random
./gen -t 10 -n 100 -type... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerTestlibCmd(argc, argv);
int t = inf.readInt();
for (int test = 1; test <= t; ++test) {
int n = inf.readInt();
vector<int> a(n);
for (int i = 0; i < n; ++i) {
a[... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int t = inf.readInt(1, 100, "t");
inf.readEoln();
for (int test = 0; test < t; ++test) {
int n = inf.readInt(1, 100, "n");
inf.readEoln();
vector<... | #include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int arr[100];
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
int i;
int sum = 0;
bool flag = false;
for (i = 0; i < n; i++) {
sum += arr[i];
if (sum % 2 ... | ```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int arr[100];
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
int i;
int sum = 0;
bool flag = false;
for (i = 0; i < n; i++) {
sum += arr[i];
if (s... | 836 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmputnalqn_.cpp",
"line": 21,
"column": 13,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-a... | [] | {
"original_total_messages": 4,
"revised_total_messages": 0,
"old_messages_remaining": 0,
"new_messages_count": 0,
"mrr_at_pass": 1,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.3235294118,
"original_loc": 34,
"revised_loc": 35,
"added_lines": 6,
"deleted_lines": 5,
"category_mrr": {... | null |
1328_C_py3_0 | 1328_C | test | py3 | import sys
t = int(sys.stdin.readline())
def search(x, n):
a = '1'
b = '1'
g = 0
for i in range(1, n):
v = x[i]
if g == 0:
if v == '2':
a += '1'
b += '1'
elif v == '1':
a += '1'
b += '0'
... | [
{
"tool": "pylint",
"file": "/tmp/tmpdzmfnf6w.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Missing module docstring",
"check_name": "missing-module-docstring",
"category": "readability",
"message_identity": "missing-module-docstring::Missing module docstri... | 7 | 36 | false | Codeforces | Ternary XOR | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
// Register the generator
registerGen(argc, argv, 1);
// Parse command-line arguments
int t = opt<int>("t");
int max_n = opt<int>("max_n");
string x_type = opt<string>("x_type", "random");
... | ./gen -t 1 -max_n 1 -x_type min_n
./gen -t 1 -max_n 50000 -x_type max_n
./gen -t 5 -max_n 10000 -x_type min_digit
./gen -t 5 -max_n 10000 -x_type max_digit
./gen -t 5 -max_n 10000 -x_type all_2
./gen -t 5 -max_n 10000 -x_type all_0
./gen -t 5 -max_n 10000 -x_type random
./gen -t 5 -max_n 10000 -x_type alternating
./ge... | #include "testlib.h"
#include <iostream>
#include <string>
using namespace std;
bool isValid(string s, int n) {
if (s.length() != n)
return false;
if (s[0] == '0')
return false;
for (char c : s) {
if (c != '0' && c != '1' && c != '2')
return false;
}
return true... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int t = inf.readInt(1, 10000, "t");
inf.readEoln();
long long sum_n = 0;
for (int test = 1; test <= t; ++test) {
int n = inf.readInt(1, 50000, "n");
... | import sys
def search(digits, length):
"""Return two strings a and b based on the given digit string."""
a = '1'
b = '1'
g = 0
for i in range(1, length):
v = digits[i]
if not g:
if v == '2':
a += '1'
b += '1'
elif v == '1':
... | ```python
import sys
def search(digits, length):
"""Return two strings a and b based on the given digit string."""
a = '1'
b = '1'
g = 0
for i in range(1, length):
v = digits[i]
if not g:
if v == '2':
a += '1'
b += '1'
elif v ... | 1,006 | null | true | null | false | SyntaxError: invalid syntax (line 1) | [
{
"tool": "pylint",
"file": "/tmp/tmpdzmfnf6w.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Missing module docstring",
"check_name": "missing-module-docstring",
"category": "readability",
"message_identity": "missing-module-docstring::Missing module docstri... | [] | null | null |
1345_C_py3_0 | 1345_C | test | py3 |
t = int(input())
while t:
n = int(input())
l1 = list(map(int, input().split()))
arr =[0 for j in range(0,n)]
# print (arr)
for i in range(0,n):
val=i+l1[i]
m=val%n
if arr[m]==1:
print ("NO")
break
else:
arr[m]=1
... | [
{
"tool": "pylint",
"file": "/tmp/tmpgildn9k4.py",
"line": 2,
"column": 0,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"to... | 5 | 17 | true | Codeforces | Hilbert's Hotel | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int t = opt<int>("t", 1);
string type = opt<string>("type", "random");
int nmax = opt<int>("nmax", 200000);
// Ensure t is within constraints
t = min(t, 10000);
... | ./gen -t 1 -type small
./gen -t 2 -type small
./gen -t 10 -type small
./gen -t 1 -type large -nmax 200000
./gen -t 5 -type large -nmax 200000
./gen -t 1 -type zero_ai
./gen -t 1 -type same_ai
./gen -t 1 -type positive_ai
./gen -t 1 -type negative_ai
./gen -t 1 -type max_ai
./gen -t 1 -type min_ai
./gen -t 5 -type ze... | #include "testlib.h"
#include <string>
using namespace std;
const string YES = "YES";
const string NO = "NO";
int main(int argc, char *argv[]) {
setName("%s", ("multiple " + YES + "/" + NO + " (case insensitive)").c_str());
registerTestlibCmd(argc, argv);
int index = 0, yesCount = 0, noCount... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int t = inf.readInt(1, 10000, "t");
inf.readEoln();
long long total_n = 0;
for (int test = 1; test <= t; ++test) {
int n = inf.readInt(1, 200000, "n");
... | t = int(input())
while t:
n = int(input())
l1 = list(map(int, input().split()))
arr = [0 for j in range(n)]
for i in range(n):
val = i + l1[i]
m = val % n
if arr[m] == 1:
print("NO")
break
else:
arr[m] = 1
else:
print("Y... | t = int(input())
while t:
n = int(input())
l1 = list(map(int, input().split()))
arr = [0 for j in range(n)]
for i in range(n):
val = i + l1[i]
m = val % n
if arr[m] == 1:
print("NO")
break
else:
arr[m] = 1
else:
print("Y... | 635 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmpgildn9k4.py",
"line": 2,
"column": 0,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"to... | [
{
"tool": "pylint",
"file": "/tmp/tmpmnf20xzu.py",
"line": 21,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 5,
"revised_total_messages": 3,
"old_messages_remaining": 3,
"new_messages_count": 0,
"mrr_at_pass": 0.4,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.962962963,
"original_loc": 27,
"revised_loc": 21,
"added_lines": 10,
"deleted_lines": 16,
"category_mrr"... | null |
1362_C_py3_0 | 1362_C | train | py3 | import math
def Divisors(n) :
l=[]
i = 1
while i <= math.sqrt(n):
if (n % i == 0) :
if (n // i == i) :
l.append(i)
else :
l.append(i)
l.append(n//i)
i = i + 1
return l
def SieveOfEratosthenes(n):
l=[]
prime = [True for i in range(n+1)]
p = 2
while (p * p <= n):
... | [
{
"tool": "pylint",
"file": "/tmp/tmppcpref19.py",
"line": 1,
"column": 11,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"t... | 95 | 76 | true | Codeforces | Johnny and Another Rating Drop | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
const long long MAX_N = 1000000000000000000LL;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int t = opt<int>("t");
string type = opt<string>("type", "random");
// Ensure t is within constraints
t = max(1, min(t, ... | ./gen -t 1 -type min
./gen -t 1 -type max
./gen -t 1 -type small
./gen -t 1 -type large
./gen -t 1 -type random
./gen -t 2 -type power2
./gen -t 2 -type less_power2
./gen -t 2 -type near_power2
./gen -t 10 -type small
./gen -t 10 -type large
./gen -t 10 -type random
./gen -t 10 -type power2
./gen -t 10 -type less_powe... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int t = inf.readInt(1, 10000, "t");
inf.readEoln();
for (int i = 0; i < t; ++i) {
long long n = inf.readLong(1LL, 1000000000000000000LL, "n");
inf.readEoln();
}
inf... | import math
def divisors(n):
l = []
i = 1
while i <= math.sqrt(n):
if not n % i:
if n // i == i:
l.append(i)
else:
l.append(i)
l.append(n // i)
i = i + 1
return l
def sieve_of_eratosthenes(n):
l = []
prim... | import math
def divisors(n):
l = []
i = 1
while i <= math.sqrt(n):
if not n % i:
if n // i == i:
l.append(i)
else:
l.append(i)
l.append(n // i)
i = i + 1
return l
def sieve_of_eratosthenes(n):
l = []
prim... | 3,631 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmppcpref19.py",
"line": 1,
"column": 11,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"t... | [
{
"tool": "pylint",
"file": "/tmp/tmpnhu2ahqm.py",
"line": 84,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 95,
"revised_total_messages": 9,
"old_messages_remaining": 9,
"new_messages_count": 0,
"mrr_at_pass": 0.9052631579,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 1.701754386,
"original_loc": 114,
"revised_loc": 84,
"added_lines": 82,
"deleted_lines": 112,
"c... | null |
1401_D_cpp_0 | 1401_D | train | cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
vector<int> g[N];
int n, m, p[N], fa[N];
const long long mod = 1e9 + 7;
int cnt;
vector<long long> v;
long long sz[N];
void dfs(int u, int f) {
sz[u] = 1;
fa[u] = f;
for (int it : g[u]) {
if (it == f) continue;
dfs(it, u);
sz[u] += s... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp8v9ne8wu.cpp",
"line": 14,
"column": 17,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-a... | 3 | 72 | true | Codeforces | Maximum Distributed Tree | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
vector<pair<int,int>> generateTree(int n, string treeType) {
vector<pair<int,int>> edges;
if (treeType == "chain") {
for (int i = 2; i <= n; ++i) {
edges.push_back({i-1, i});
}
} else if (treeType == "star") {
... | # Small n and m
./gen -t 1 -n 2 -m 1 -treeType chain -primeType same
# Small but non-trivial test cases
./gen -t 1 -n 5 -m 2 -treeType star -primeType small
./gen -t 1 -n 10 -m 5 -treeType balanced -primeType same
# Medium n and m
./gen -t 1 -n 1000 -m 100 -treeType random -primeType random
# Large n, small m
./gen ... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100000;
const int MAX_M = 60000;
const int MAX_P = 60000;
// Disjoint Set Union class for Union-Find operations
class DSU {
public:
vector<int> parent;
DSU(int n) : parent(n) {
for (int i = 0; i < n; ++i)
... | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
vector<int> g[N];
int n, m, p[N], fa[N];
const long long mod = 1e9 + 7;
int cnt;
vector<long long> v;
long long sz[N];
void dfs(int u, int f) {
sz[u] = 1;
fa[u] = f;
for (int it : g[u]) {
if (it == f) continue;
dfs(it, u);
sz[u] += s... | ```cpp
#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
vector<int> g[N];
int n, m, p[N], fa[N];
const long long mod = 1e9 + 7;
int cnt;
vector<long long> v;
long long sz[N];
void dfs(int u, int f) {
sz[u] = 1;
fa[u] = f;
for (int it : g[u]) {
if (it == f) continue;
dfs(it, u);
sz[... | 1,592 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp8v9ne8wu.cpp",
"line": 14,
"column": 17,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-a... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpn4dlmamf.cpp",
"line": 14,
"column": 17,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-a... | {
"original_total_messages": 3,
"revised_total_messages": 1,
"old_messages_remaining": 1,
"new_messages_count": 0,
"mrr_at_pass": 0.6666666667,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.1388888889,
"original_loc": 72,
"revised_loc": 72,
"added_lines": 5,
"deleted_lines": 5,
"categ... | null |
1437_D_cpp_0 | 1437_D | train | cpp | #include <bits/stdc++.h>
using namespace std;
long long int n, ans;
vector<long long int> a, ng;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
int t;
cin >> t;
while (t--) {
cin >> n;
a.resize(n);
for (int i = 0; i < n; i++) cin >> a[i];
vector<int> inc;
int l... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp2bk90pt0.cpp",
"line": 7,
"column": 11,
"severity": "warning",
"message_text": "use nullptr",
"check_name": "modernize-use-nullptr",
"category": "modernize",
"message_identity": "modernize-use-nullptr::use nullptr"
},
{
"tool": "cl... | 4 | 44 | true | Codeforces | Minimal Height Tree | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int t = opt<int>("t", 1);
int n_fixed = opt<int>("n", -1); // If 'n' is provided, it will be used for all test cases
string type = opt<string>("type", "random");
const... | # Test with minimal n
./gen -t 1 -n 2 -type path
./gen -t 1 -n 2 -type star
./gen -t 1 -n 2 -type random
./gen -t 1 -n 2 -type balanced
# Small sizes
./gen -t 1 -n 5 -type path
./gen -t 1 -n 5 -type star
./gen -t 1 -n 5 -type random
./gen -t 1 -n 5 -type balanced
# Medium sizes
./gen -t 1 -n 1000 -type path
./gen -t ... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int t = inf.readInt(1, 1000, "t");
inf.readEoln();
long long total_n = 0;
for (int test = 0; test < t; ++test) {
int n = inf.readInt(2, 200000, "n");
... | #include <bits/stdc++.h>
using namespace std;
long long int n, ans;
vector<long long int> a, ng;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(nullptr);
cout.tie(nullptr);
int t;
cin >> t;
while (t--) {
cin >> n;
a.resize(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
vector... | ```cpp
#include <bits/stdc++.h>
using namespace std;
long long int n, ans;
vector<long long int> a, ng;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(nullptr);
cout.tie(nullptr);
int t;
cin >> t;
while (t--) {
cin >> n;
a.resize(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
... | 949 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp2bk90pt0.cpp",
"line": 7,
"column": 11,
"severity": "warning",
"message_text": "use nullptr",
"check_name": "modernize-use-nullptr",
"category": "modernize",
"message_identity": "modernize-use-nullptr::use nullptr"
},
{
"tool": "cl... | [] | {
"original_total_messages": 4,
"revised_total_messages": 0,
"old_messages_remaining": 0,
"new_messages_count": 0,
"mrr_at_pass": 1,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.3181818182,
"original_loc": 44,
"revised_loc": 46,
"added_lines": 8,
"deleted_lines": 6,
"category_mrr": {... | null |
1499_B_py3_0 | 1499_B | train | py3 | cases = int(input())
while cases:
cases -= 1
s = input()
if "11" not in s:
print("YES")
elif "00" not in s:
print("Yes")
elif "1100" in s:
print("NO")
elif "00" in s and "11" in s:
xx = []
yy = []
x = s.replace("00", "a")
y = x.replace("1... | [
{
"tool": "pylint",
"file": "/tmp/tmp_x3o77w_.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Missing module docstring",
"check_name": "missing-module-docstring",
"category": "readability",
"message_identity": "missing-module-docstring::Missing module docstri... | 1 | 31 | true | Codeforces | Binary Removals | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
const int MAX_T = 1000;
const int MAX_LEN = 100;
const int MIN_LEN = 2;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int t = opt<int>("t", 1); // number of test cases
string type = opt<string>("type", "random");
int ... | ./gen -t 1 -len 2 -type yes
./gen -t 1 -len 2 -type no
./gen -t 1 -len 100 -type yes
./gen -t 1 -len 100 -type no
./gen -t 1 -len 100 -type random
./gen -t 10 -len 50 -type yes
./gen -t 10 -len 50 -type no
./gen -t 10 -len 50 -type random
./gen -t 100 -len 100 -type yes
./gen -t 100 -len 100 -type no
./gen -t 100 -l... | #include "testlib.h"
#include <string>
using namespace std;
const string YES = "YES";
const string NO = "NO";
int main(int argc, char *argv[]) {
setName("%s", ("multiple " + YES + "/" + NO + " (case insensitive)").c_str());
registerTestlibCmd(argc, argv);
int index = 0, yesCount = 0, noCount... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int t = inf.readInt(1, 1000, "t");
inf.readEoln();
for (int tc = 0; tc < t; ++tc) {
string s = inf.readLine("[01]{2,100}", "s");
}
inf.readEof();
retu... | cases = int(input())
while cases:
cases -= 1
s = input()
if "11" not in s:
print("YES")
elif "00" not in s:
print("Yes")
elif "1100" in s:
print("NO")
elif "00" in s and "11" in s:
xx = []
yy = []
x = s.replace("00", "a")
y = x.replace("1... | cases = int(input())
while cases:
cases -= 1
s = input()
if "11" not in s:
print("YES")
elif "00" not in s:
print("Yes")
elif "1100" in s:
print("NO")
elif "00" in s and "11" in s:
xx = []
yy = []
x = s.replace("00", "a")
y = x.replace("1... | 748 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmp_x3o77w_.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Missing module docstring",
"check_name": "missing-module-docstring",
"category": "readability",
"message_identity": "missing-module-docstring::Missing module docstri... | [
{
"tool": "pylint",
"file": "/tmp/tmp6rc9j92z.py",
"line": 33,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 1,
"revised_total_messages": 2,
"old_messages_remaining": 1,
"new_messages_count": 1,
"mrr_at_pass": -1,
"new_msg_per_sample_at_pass": 1,
"line_churn_at_pass": 0.0606060606,
"original_loc": 33,
"revised_loc": 33,
"added_lines": 1,
"deleted_lines": 1,
"category_mrr": ... | null |
151_C_py3_0 | 151_C | train | py3 | def winorfreeze(n):
factors = []
# If there are at least three prime factors playes 1 wins
# saying the product of two of them
i = 2
while i * i <= n:
while n % i == 0:
factors.append(i)
n //= i
if len(factors) == 2 and n != 1:
return fact... | [
{
"tool": "pylint",
"file": "/tmp/tmpdlv36o1g.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Missing module docstring",
"check_name": "missing-module-docstring",
"category": "readability",
"message_identity": "missing-module-docstring::Missing module docstri... | 4 | 25 | true | Codeforces | Win or Freeze | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]){
registerGen(argc, argv, 1);
long long q = opt<long long>("q", -1);
string type = opt<string>("type", "random");
long long maxq = opt<long long>("maxq", 10000000000000LL); // 1e13
long long minq = o... | ./gen -q 1
./gen -q 2
./gen -q 3
./gen -q 4
./gen -q 5
./gen -type max
./gen -type min
./gen -type random
./gen -type random -minq 1 -maxq 100
./gen -type random -minq 100000000 -maxq 1000000000
./gen -type prime -minq 1 -maxq 100
./gen -type prime -minq 10000 -maxq 100000
./gen -type bigprime
./gen -type composite... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
/*
Because the problem explicitly states "If the first player wins, print ANY winning first move",
there can be multiple correct answers for a single input. Hence we need a CUSTOM checker
(rather than a built-in checker) to verify the contesta... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
long long q = inf.readLong(1, 10000000000000LL, "q");
inf.readEoln();
inf.readEof();
return 0;
}
| def winorfreeze(n):
"""Return the product of the first two prime factors if possible, else 0 or None."""
factors = []
i = 2
while i * i <= n:
while not n % i:
factors.append(i)
n //= i
if len(factors) == 2 and n != 1:
return factors[0] * facto... | def winorfreeze(n):
"""Return the product of the first two prime factors if possible, else 0 or None."""
factors = []
i = 2
while i * i <= n:
while not n % i:
factors.append(i)
n //= i
if len(factors) == 2 and n != 1:
return factors[0] * facto... | 785 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmpdlv36o1g.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Missing module docstring",
"check_name": "missing-module-docstring",
"category": "readability",
"message_identity": "missing-module-docstring::Missing module docstri... | [
{
"tool": "pylint",
"file": "/tmp/tmpllpwughw.py",
"line": 29,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 4,
"revised_total_messages": 2,
"old_messages_remaining": 1,
"new_messages_count": 1,
"mrr_at_pass": 0.5,
"new_msg_per_sample_at_pass": 1,
"line_churn_at_pass": 0.3225806452,
"original_loc": 31,
"revised_loc": 29,
"added_lines": 4,
"deleted_lines": 6,
"category_mrr":... | null |
1528_D_java_0 | 1528_D | train | java | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
/**
* Built using CHelper... | [
{
"tool": "pmd",
"file": "/tmp/tmp1b4rri6m.java",
"line": 29,
"column": 9,
"severity": "warning",
"message_text": "Missing commented default access modifier on nested class 'DItsABirdNoItsAPlaneNoItsAaParsa'",
"check_name": "CommentDefaultAccessModifier",
"category": "readability",
... | 15 | 99 | false | Codeforces | It's a bird! No, it's a plane! No, it's AaParsa! | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int m = opt<int>("m");
int cmin = opt<int>("cmin", 1);
int cmax = opt<int>("cmax", 1000000000);
string type = opt<string>("type", "random");
... | ./gen -n 2 -m 2 -type random
./gen -n 5 -m 5 -type random
./gen -n 5 -m 10 -type random
./gen -n 50 -m 100 -type random
./gen -n 600 -m 600 -type random
./gen -n 600 -m 10000 -type random
./gen -n 5 -m 5 -type chain
./gen -n 50 -m 50 -type chain
./gen -n 100 -m 200 -type chain
./gen -n 600 -m 3000 -type chai... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(2, 600, "n");
inf.readSpace();
int m = inf.readInt(n, n * n, "m");
inf.readEoln();
vector<int> cities_have_cannon(n, 0);
set<pair<int, int... | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* @author ... | ```java
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* ... | 2,289 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmp1b4rri6m.java",
"line": 29,
"column": 9,
"severity": "warning",
"message_text": "Missing commented default access modifier on nested class 'DItsABirdNoItsAPlaneNoItsAaParsa'",
"check_name": "CommentDefaultAccessModifier",
"category": "readability",
... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
1569_B_java_0 | 1569_B | train | java | import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int tc = 0; tc < t; ++tc) {
sc.nextInt();
Str... | [
{
"tool": "pmd",
"file": "/tmp/tmpmcjlqrgu.java",
"line": 21,
"column": 17,
"severity": "warning",
"message_text": "Missing commented default access modifier on method 'solve(String)'",
"check_name": "CommentDefaultAccessModifier",
"category": "readability",
"message_identity": "... | 1 | 37 | false | Codeforces | Chess Tournament | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int t = opt<int>("t", 1);
int n = opt<int>("n", 2);
bool rand_n = opt<bool>("rand_n", false);
string type = opt<string>("type", "random");
printf("%d\n", t);
... | ./gen -t 1 -type all_type1 -n 2
./gen -t 1 -type all_type1 -n 50
./gen -t 1 -type all_type2 -n 2
./gen -t 1 -type all_type2 -n 50
./gen -t 1 -type impossible -n 2
./gen -t 1 -type impossible -n 50
./gen -t 1 -type random -n 2
./gen -t 1 -type random -n 50
./gen -t 1 -type half_half -n 50
./gen -t 1 -type alternate ... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
/*
This problem admits multiple correct answers because there can be many ways
to assign wins, losses, and draws to meet all players' expectations.
The checker below does the following for each test case:
1. Reads n and the expectation string ... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int t = inf.readInt(1, 200, "t");
inf.readEoln();
for (int testCase = 0; testCase < t; ++testCase) {
int n = inf.readInt(2, 50, "n");
inf.readEoln();
... | import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int tc = 0; tc < t; ++tc) {
sc.nextInt();
Str... | ```java
import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int tc = 0; tc < t; ++tc) {
sc.nextInt();
... | 1,040 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpmcjlqrgu.java",
"line": 21,
"column": 17,
"severity": "warning",
"message_text": "Missing commented default access modifier on method 'solve(String)'",
"check_name": "CommentDefaultAccessModifier",
"category": "readability",
"message_identity": "... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
1586_B_py3_0 | 1586_B | valid | py3 | from sys import stdin
for testcase in range(int(stdin.readline())):
n, m = map(int, stdin.readline().split())
restrictions = [ list(map(int, stdin.readline().split())) for restriction in range(m) ]
isNodeWithRestrictions = [ False for node in range(n) ]
for restriction in restrictions: isNodeWithR... | [
{
"tool": "pylint",
"file": "/tmp/tmp0c8wi5sz.py",
"line": 6,
"column": 0,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"to... | 9 | 13 | true | Codeforces | Omkar and Heavenly Tree | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int m = opt<int>("m");
string type = opt<string>("type", "random");
// Output number of test cases
int t = 1;
printf("%d\n", t);
p... | ./gen -n 3 -m 1 -type min
./gen -n 10000 -m 9999 -type random
./gen -n 10000 -m 5000 -type random
./gen -n 10000 -m 1 -type fixed_b
./gen -n 9000 -m 1 -type fixed_b
./gen -n 8000 -m 7000 -type pathological
./gen -n 7000 -m 3500 -type pathological
./gen -n 5000 -m 4999 -type random
./gen -n 4000 -m 2000 -type ra... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerTestlibCmd(argc, argv);
int t = inf.readInt(1, 10000, "t");
long long total_n = 0;
for (int testCase = 1; testCase <= t; ++testCase) {
// Read n and m
int n = inf.readInt(3, 100... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int t = inf.readInt(1, 10000, "t");
inf.readEoln();
long long sum_n = 0;
for (int tc = 1; tc <= t; ++tc) {
int n = inf.readInt(3, 100000, "n");
inf... | from sys import stdin
def main():
"""Process test cases."""
for testcase in range(int(stdin.readline())):
n, m = map(int, stdin.readline().split())
restrictions = [
list(map(int, stdin.readline().split()))
for _ in range(m)
]
is_node_with_restrictions =... | from sys import stdin
def main():
"""Process test cases."""
for testcase in range(int(stdin.readline())):
n, m = map(int, stdin.readline().split())
restrictions = [
list(map(int, stdin.readline().split()))
for _ in range(m)
]
is_node_with_restrictions =... | 831 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmp0c8wi5sz.py",
"line": 6,
"column": 0,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"to... | [
{
"tool": "pylint",
"file": "/tmp/tmpu29enx_p.py",
"line": 29,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 9,
"revised_total_messages": 3,
"old_messages_remaining": 2,
"new_messages_count": 1,
"mrr_at_pass": 0.6666666667,
"new_msg_per_sample_at_pass": 1,
"line_churn_at_pass": 2.3888888889,
"original_loc": 18,
"revised_loc": 29,
"added_lines": 27,
"deleted_lines": 16,
"cat... | null |
175_E_cpp_0 | 175_E | train | cpp | #include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const double eps = 1e-9;
struct MinCostMaxFlow {
static const int MAXV = 110;
static const int INF = 1000000000;
struct Edge {
int v, cap;
double w;
int rev;
Edge() {}
Edge(int t2, int t3, double t4, int t5) : v(t2), cap(... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpz_5xbado.cpp",
"line": 20,
"column": 33,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-a... | 25 | 189 | true | Codeforces | Power Defence | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
// Read required parameters
int nf = opt<int>("nf");
int ne = opt<int>("ne");
int ns = opt<int>("ns");
int total_n = nf + ne + ns;
if (nf < 0 || nf > 20) { fp... | # Test case 1: Minimal towers
./gen -nf 1 -ne 0 -ns 0
# Test case 2: Maximum number of fire-towers
./gen -nf 20 -ne 0 -ns 0
# Test case 3: Maximum number of electric-towers
./gen -nf 0 -ne 20 -ns 0
# Test case 4: Maximum number of freezing-towers
./gen -nf 0 -ne 0 -ns 20
# Test case 5: Equal number of each type
./g... | #include "testlib.h"
using namespace std;
const double EPS = 1E-6;
int main(int argc, char *argv[]) {
setName("compare two sequences of doubles, max absolute or relative error = %.7f", EPS);
registerTestlibCmd(argc, argv);
int n = 0;
double j = 0, p = 0;
while (!ans.seekEof()) {
... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
// Read nf, ne, ns
int nf = inf.readInt(0, 20, "nf");
inf.readSpace();
int ne = inf.readInt(0, 20, "ne");
inf.readSpace();
int ns = inf.readInt(0, 20, "ns");
... | #include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const double eps = 1e-9;
struct MinCostMaxFlow {
static const int MAXV = 110;
static const int INF = 1000000000;
struct Edge {
int v, cap;
double w;
int rev;
Edge() {}
Edge(int t2, int t3, double t4, int t5) : v(t2), cap(... | ```cpp
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const double eps = 1e-9;
struct MinCostMaxFlow {
static const int MAXV = 110;
static const int INF = 1000000000;
struct Edge {
int v, cap;
double w;
int rev;
Edge() {}
Edge(int t2, int t3, double t4, int t5) : v(t2... | 4,715 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpz_5xbado.cpp",
"line": 20,
"column": 33,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-a... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpud3xuxts.cpp",
"line": 82,
"column": 16,
"severity": "warning",
"message_text": "initialization of 'flow' with static storage duration may throw an exception that cannot be caught",
"check_name": "bugprone-throwing-static-initialization",
"cat... | {
"original_total_messages": 25,
"revised_total_messages": 2,
"old_messages_remaining": 2,
"new_messages_count": 0,
"mrr_at_pass": 0.92,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.5343915344,
"original_loc": 189,
"revised_loc": 226,
"added_lines": 69,
"deleted_lines": 32,
"category... | null |
181_D_java_0 | 181_D | train | java | import java.io.*;
import java.util.*;
public class wordcut {
public static void main(String[] args) throws Exception {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter w = new BufferedWriter(new OutputStreamWriter(System.out));
String start = r.readLine();
Strin... | [
{
"tool": "pmd",
"file": "/tmp/tmpm_rkpq5m.java",
"line": 4,
"column": 8,
"severity": "error",
"message_text": "The utility class name 'wordcut' doesn't match '[A-Z][a-zA-Z0-9]*'",
"check_name": "ClassNamingConventions",
"category": "readability",
"message_identity": "ClassNaming... | 8 | 40 | false | Codeforces | Word Cut | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
string random_string(int n) {
string s(n, 'a');
for (int i = 0; i < n; ++i) {
s[i] = 'a' + rnd.next(26);
}
return s;
}
string cyclic_shift(string s, int shift) {
int n = s.size();
string t = s.substr(shift, n - shift) ... | ./gen -n 2 -k 0 -type equal
./gen -n 2 -k 1 -type equal
./gen -n 2 -k 2 -type equal
./gen -n 10 -k 5 -type cyclic
./gen -n 10 -k 5 -type noncyclic
./gen -n 10 -k 0 -type random
./gen -n 10 -k 100000 -type random
./gen -n 1000 -k 100000 -type max_n
./gen -n 1000 -k 100000 -type max_k
./gen -n 1000 -type cyclic_max
./gen... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
string start = inf.readToken("[a-z]{2,1000}", "start");
inf.readEoln();
string end = inf.readToken("[a-z]{2,1000}", "end");
inf.readEoln();
ensuref(int(start.... | import java.io.*;
import java.util.*;
public class WordCut {
private static final int MOD = 1_000_000_007;
public static void main(String[] args) throws IOException {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter w = new BufferedWriter(new OutputStream... | ```java
import java.io.*;
import java.util.*;
public class WordCut {
private static final int MOD = 1_000_000_007;
public static void main(String[] args) throws IOException {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter w = new BufferedWriter(new Outp... | 1,261 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpm_rkpq5m.java",
"line": 4,
"column": 8,
"severity": "error",
"message_text": "The utility class name 'wordcut' doesn't match '[A-Z][a-zA-Z0-9]*'",
"check_name": "ClassNamingConventions",
"category": "readability",
"message_identity": "ClassNaming... | [] | null | {
"pass_at_1": false,
"compile_ok": false,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
249_A_java_0 | 249_A | valid | java | import static java.util.Arrays.deepToString;
import java.io.*;
import java.math.*;
import java.util.*;
public class A {
static void solve() {
int y1 = nextInt();
int y2 = nextInt();
int yw = nextInt();
int xb = nextInt();
int yb = nextInt();
int r = nextInt();
yw -= r;
int bY = y1 + r;
double xw =... | [
{
"tool": "pmd",
"file": "/tmp/tmp9muji0sv.java",
"line": 7,
"column": 16,
"severity": "warning",
"message_text": "This class has too many methods, consider refactoring it.",
"check_name": "TooManyMethods",
"category": "modernize",
"message_identity": "TooManyMethods::This class ... | 29 | 83 | false | Codeforces | Robo-Footballer | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
const int MAX_Y = 1000000;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int max_value = opt<int>("max_value", MAX_Y);
string type = opt<string>("type");
int y1, y2, yw, xb, yb, r;
if (type == "possible") {
... | ./gen -type possible
./gen -type possible
./gen -type possible
./gen -type possible
./gen -type possible
./gen -type impossible
./gen -type impossible
./gen -type impossible
./gen -type impossible
./gen -type impossible
./gen -type borderline
./gen -type borderline
./gen -type borderline
./gen -type borderline
./gen ... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
/*
This problem admits infinitely many valid solutions for some inputs
(since any valid bounce point on the top wall that still sends the ball
through the goal is acceptable). Hence we need a custom checker.
Checker logic:
1) We read ... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
// Read the six integers on a single line
int y1 = inf.readInt(1, 1000000, "y1");
inf.readSpace();
int y2 = inf.readInt(1, 1000000, "y2");
inf.readSpace();
i... | import static java.util.Arrays.deepToString;
import java.io.*;
import java.math.*;
import java.util.*;
public class A {
private static BufferedReader reader;
private static PrintWriter writer;
private static StringTokenizer tok = new StringTokenizer("");
private static long systemTime;
static vo... | ```java
import static java.util.Arrays.deepToString;
import java.io.*;
import java.math.*;
import java.util.*;
public class A {
private static BufferedReader reader;
private static PrintWriter writer;
private static StringTokenizer tok = new StringTokenizer("");
private static long systemTime;
s... | 2,321 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmp9muji0sv.java",
"line": 7,
"column": 16,
"severity": "warning",
"message_text": "This class has too many methods, consider refactoring it.",
"check_name": "TooManyMethods",
"category": "modernize",
"message_identity": "TooManyMethods::This class ... | [] | null | {
"pass_at_1": false,
"compile_ok": false,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
255_C_java_0 | 255_C | train | java | import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
* @author She... | [
{
"tool": "pmd",
"file": "/tmp/tmpw4qka5am.java",
"line": 27,
"column": 1,
"severity": "warning",
"message_text": "Each class should declare at least one constructor",
"check_name": "AtLeastOneConstructor",
"category": "readability",
"message_identity": "AtLeastOneConstructor::Ea... | 13 | 85 | false | Codeforces | Almost Arithmetical Progression | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
vector<int> b(n);
if (type == "random") {
// Random sequence of elements between 1 and 1e... | ./gen -n 1 -type same
./gen -n 1 -type random
./gen -n 2 -type same
./gen -n 2 -type random
./gen -n 2 -type constant_aap
./gen -n 3 -type random
./gen -n 10 -type same
./gen -n 10 -type random
./gen -n 10 -type increasing
./gen -n 10 -type decreasing
./gen -n 10 -type alternating_small
./gen -n 10 -type alternating... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 4000, "n");
inf.readEoln();
vector<int> b = inf.readInts(n, 1, 1000000, "b");
inf.readEoln();
inf.readEof();
return 0;
}
| import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;
public class Main {
public static void main(String[] args) {
InputStre... | ```java
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;
public class Main {
public static void main(String[] args) {
I... | 1,939 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpw4qka5am.java",
"line": 27,
"column": 1,
"severity": "warning",
"message_text": "Each class should declare at least one constructor",
"check_name": "AtLeastOneConstructor",
"category": "readability",
"message_identity": "AtLeastOneConstructor::Ea... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
263_A_py3_0 | 263_A | test | py3 | a = []
row = 0
col = 0
for i in range(5):
a.append(input().split())
for i in range(5):
for j in range(5):
a[i][j] = int(a[i][j])
if a[i][j] == 1:
row = i
col = j
row_movement = abs(row - 2)
col_movement = abs(col - 2)
print(row_movement + col_movement)
| [
{
"tool": "pylint",
"file": "/tmp/tmpgphbz4l0.py",
"line": 19,
"column": 0,
"severity": "warning",
"message_text": "Trailing newlines",
"check_name": "trailing-newlines",
"category": "readability",
"message_identity": "trailing-newlines::Trailing newlines"
},
{
"tool": "p... | 2 | 14 | true | Codeforces | Beautiful Matrix | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
string type = opt<string>("type", "random");
int r, c; // positions of '1'
if (type == "center") {
r = 3;
c = 3;
} else if (type == "corner") {
... | ./gen -type center
./gen -type corner -corner 0
./gen -type corner -corner 1
./gen -type corner -corner 2
./gen -type corner -corner 3
./gen -type edge -position 0
./gen -type edge -position 5
./gen -type near_center -position 0
./gen -type near_center -position 3
./gen -type random
./gen -type random
./gen -type r... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int onesCount = 0;
for(int i = 0; i < 5; i++) {
for(int j = 0; j < 5; j++) {
int x = inf.readInt(0, 1, format("cell[%d][%d]", i+1, j+1));
if... | a = []
row = 0
col = 0
for i in range(5):
a.append(input().split())
for i in range(5):
for j in range(5):
a[i][j] = int(a[i][j])
if a[i][j] == 1:
row = i
col = j
row_movement = abs(row - 2)
col_movement = abs(col - 2)
print(row_movement + col_movement) | a = []
row = 0
col = 0
for i in range(5):
a.append(input().split())
for i in range(5):
for j in range(5):
a[i][j] = int(a[i][j])
if a[i][j] == 1:
row = i
col = j
row_movement = abs(row - 2)
col_movement = abs(col - 2)
print(row_movement + col_movement) | 557 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmpgphbz4l0.py",
"line": 19,
"column": 0,
"severity": "warning",
"message_text": "Trailing newlines",
"check_name": "trailing-newlines",
"category": "readability",
"message_identity": "trailing-newlines::Trailing newlines"
},
{
"tool": "p... | [
{
"tool": "pylint",
"file": "/tmp/tmp87oi2fqd.py",
"line": 16,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 2,
"revised_total_messages": 2,
"old_messages_remaining": 1,
"new_messages_count": 1,
"mrr_at_pass": 0,
"new_msg_per_sample_at_pass": 1,
"line_churn_at_pass": 0.2631578947,
"original_loc": 19,
"revised_loc": 16,
"added_lines": 1,
"deleted_lines": 4,
"category_mrr": {... | null |
284_D_cpp_0 | 284_D | train | cpp | #include <bits/stdc++.h>
using namespace std;
const int INF = 1000000002;
const long long INFLL = 100000000000000000ll;
const long long MOD = 1000000007;
const int MAX = 200005;
bool Mark[MAX][2];
int Good[MAX][2];
int N, A[MAX];
long long D[MAX][2], End;
int dfs(int i, int step, long long sum) {
End = max(End, sum);... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpauvv12yl.cpp",
"line": 13,
"column": 22,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-a... | 18 | 52 | true | Codeforces | Cow Program | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
vector<int> a(n-1);
if (type == "random") {
for (int i = 0; i < n - 1; ++i) {
a... | ./gen -n 2 -type random
./gen -n 2 -type ones
./gen -n 2 -type large
./gen -n 2 -type infinite_loop
./gen -n 2 -type immediate_terminate
./gen -n 3 -type random
./gen -n 3 -type ones
./gen -n 3 -type large
./gen -n 3 -type infinite_loop
./gen -n 3 -type immediate_terminate
./gen -n 10 -type random
./gen -n 10 -type o... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(2, 200000, "n");
inf.readEoln();
vector<int> a = inf.readInts(n - 1, 1, 1000000000, "a");
inf.readEoln();
inf.readEof();
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
const int INF = 1000000002;
const long long INFLL = 100000000000000000ll;
const long long MOD = 1000000007;
const int MAX = 200005;
bool Mark[MAX][2];
int Good[MAX][2];
int N, A[MAX];
long long D[MAX][2], End;
int dfs(int i, int step, long long sum) {
End = max(End, sum);... | ```cpp
#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000002;
const long long INFLL = 100000000000000000ll;
const long long MOD = 1000000007;
const int MAX = 200005;
bool Mark[MAX][2];
int Good[MAX][2];
int N, A[MAX];
long long D[MAX][2], End;
int dfs(int i, int step, long long sum) {
End = max(End... | 1,810 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpauvv12yl.cpp",
"line": 13,
"column": 22,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-a... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp182eorgp.cpp",
"line": 48,
"column": 5,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-uncheck... | {
"original_total_messages": 18,
"revised_total_messages": 1,
"old_messages_remaining": 1,
"new_messages_count": 0,
"mrr_at_pass": 0.9444444444,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.8269230769,
"original_loc": 52,
"revised_loc": 65,
"added_lines": 28,
"deleted_lines": 15,
"ca... | null |
29_A_java_0 | 29_A | train | java | import java.util.Scanner;
import java.util.HashSet;
/**
* Created by IntelliJ IDEA.
* User: camoroh13
* Date: 20.09.2010
* Time: 18:59:12
* To change this template use File | Settings | File Templates.
*/
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(Syste... | [
{
"tool": "pmd",
"file": "/tmp/tmp_kc4_r9i.java",
"line": 23,
"column": 31,
"severity": "warning",
"message_text": "Avoid unnecessary comparisons in boolean expressions",
"check_name": "SimplifyBooleanExpressions",
"category": "modernize",
"message_identity": "SimplifyBooleanExpr... | 1 | 36 | false | Codeforces | Spit Problem | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
vector<int> xi(n);
vector<int> di(n);
const int minx = -10000;
const int maxx = 10000;
... | ./gen -n 1 -type random
./gen -n 2 -type collision
./gen -n 2 -type no_collision
./gen -n 2 -type random
./gen -n 5 -type random
./gen -n 5 -type collision
./gen -n 5 -type no_collision
./gen -n 10 -type random
./gen -n 10 -type collision
./gen -n 10 -type no_collision
./gen -n 10 -type multiple_collisions
./gen -n ... | #include "testlib.h"
#include <string>
using namespace std;
const string YES = "YES";
const string NO = "NO";
int main(int argc, char *argv[]) {
setName("%s", ("multiple " + YES + "/" + NO + " (case insensitive)").c_str());
registerTestlibCmd(argc, argv);
int index = 0, yesCount = 0, noCount... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 100, "n");
inf.readEoln();
set<int> positions;
for (int i = 0; i < n; i++) {
int xi = inf.readInt(-10000, 10000, "xi"); // xi
... | import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String ans = "NO";
int[][] arr = new int[n][3];
for (int i = 0; i < n; i++) {
arr[i][0] = sc.nextInt();
... | ```java
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String ans = "NO";
int[][] arr = new int[n][3];
for (int i = 0; i < n; i++) {
arr[i][0] = sc.nextInt();
... | 842 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmp_kc4_r9i.java",
"line": 23,
"column": 31,
"severity": "warning",
"message_text": "Avoid unnecessary comparisons in boolean expressions",
"check_name": "SimplifyBooleanExpressions",
"category": "modernize",
"message_identity": "SimplifyBooleanExpr... | [] | null | {
"pass_at_1": false,
"compile_ok": false,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
309_D_cpp_0 | 309_D | train | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
scanf("%d%d", &N, &M);
long long ans = 0;
for (int b = M + 1; b <= (N + 1) / 2; b++) {
for (int a = M + 1; a <= N - M; a++) {
int coe = (b * 2 - 1 == N ? 3 : 6);
int num = (2 * b - a) * (N + 1 - b);
int den = b + a;
... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpy3rtvq8h.cpp",
"line": 5,
"column": 3,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-unchecke... | 3 | 21 | true | Codeforces | Tennis Rackets | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int m = opt<int>("m", 0);
ensure(0 <= m && m < n); // Ensure that 0 ≤ m < n
printf("%d %d\n", n, m);
return 0;
}
| ./gen -n 1 -m 0
./gen -n 2 -m 0
./gen -n 2 -m 1
./gen -n 3 -m 0
./gen -n 3 -m 1
./gen -n 3 -m 2
./gen -n 10 -m 0
./gen -n 10 -m 1
./gen -n 10 -m 5
./gen -n 10 -m 9
./gen -n 100 -m 0
./gen -n 100 -m 50
./gen -n 100 -m 99
./gen -n 1000 -m 0
./gen -n 1000 -m 100
./gen -n 1000 -m 999
./gen -n 100000 -m 0
./gen -n 100000 -m... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 100000, "n");
inf.readSpace();
int m = inf.readInt(0, n, "m");
inf.readEoln();
inf.readEof();
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
if (scanf("%d%d", &N, &M) != 2) {
return 1;
}
long long ans = 0;
for (int b = M + 1; b <= (N + 1) / 2; b++) {
for (int a = M + 1; a <= N - M; a++) {
int coe = (b * 2 - 1 == N ? 3 : 6);
int num = (2 * b - a) * (N + 1 - b);... | ```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
if (scanf("%d%d", &N, &M) != 2) {
return 1;
}
long long ans = 0;
for (int b = M + 1; b <= (N + 1) / 2; b++) {
for (int a = M + 1; a <= N - M; a++) {
int coe = (b * 2 - 1 == N ? 3 : 6);
int num = (2 * b - a) * (N + ... | 861 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpy3rtvq8h.cpp",
"line": 5,
"column": 3,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-unchecke... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpzgo9td5h.cpp",
"line": 5,
"column": 7,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-unchecke... | {
"original_total_messages": 3,
"revised_total_messages": 2,
"old_messages_remaining": 2,
"new_messages_count": 0,
"mrr_at_pass": 0.3333333333,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.380952381,
"original_loc": 21,
"revised_loc": 23,
"added_lines": 5,
"deleted_lines": 3,
"catego... | null |
327_E_cpp_0 | 327_E | valid | cpp | /*
* Package: StandardCodeLibrary.Core
* */
//引进常用的头文件并使用std名字空间
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <utility>
#include <vector>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#in... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpsqg7j0lr.cpp",
"line": 33,
"column": 30,
"severity": "warning",
"message_text": "macro argument should be enclosed in parentheses",
"check_name": "bugprone-macro-parentheses",
"category": "bugprone",
"message_identity": "bugprone-macro-par... | 39 | 299 | false | Codeforces | Axis Walking | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
const long long D_MAX = 1000000000LL;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int k = opt<int>("k", 0);
string type = opt<string>("type", "random");
vector<long long> a(n);
... | ./gen -n 1 -k 0 -type min_elements
./gen -n 1 -k 2 -type min_elements
./gen -n 1 -k 0 -type max_elements
./gen -n 1 -k 2 -type max_elements
./gen -n 2 -k 0 -type min_elements
./gen -n 2 -k 2 -type min_elements
./gen -n 2 -k 2 -type unlucky_overlap
./gen -n 5 -k 0 -type all_same
./gen -n 5 -k 2 -type unlucky_overlap
... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 24, "n");
inf.readEoln();
vector<long long> a = inf.readLongs(n, 1LL, 1000000000LL, "a");
inf.readEoln();
int k = inf.readInt(0, 2, "k");
... | 0 | all_retries_exhausted: API_connection_error: Request timed out. | false | all_retries_exhausted: API_connection_error: Request timed out. | false | empty | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpsqg7j0lr.cpp",
"line": 33,
"column": 30,
"severity": "warning",
"message_text": "macro argument should be enclosed in parentheses",
"check_name": "bugprone-macro-parentheses",
"category": "bugprone",
"message_identity": "bugprone-macro-par... | [] | null | null | ||
332_B_py3_0 | 332_B | train | py3 | n,k=map(int,input().split())
a=list(map(int,input().split()))
dp=[0]
for i in range(n):
dp+=[dp[i]+int(a[i])]
ans1=0
ans2=0
b=0
pb=0
z=0
for i in range(n-2*k+1,0,-1):
curb=dp[i+2*k-1]-dp[i+k-1]
if curb>=b:
b=curb
pb=i+k
cura=dp[i+k-1]-dp[i-1]
if cura+b>=z:
z=cura+b
ans1=i
ans2=pb
print(ans1,ans2)
| [
{
"tool": "pylint",
"file": "/tmp/tmprk25s8a8.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Missing module docstring",
"check_name": "missing-module-docstring",
"category": "readability",
"message_identity": "missing-module-docstring::Missing module docstri... | 1 | 21 | true | Codeforces | Maximum Absurdity | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int k = opt<int>("k");
string type = opt<string>("type", "random");
ensure(2 <= n && n <= 200000); // 2 ≤ n ≤ 2·10^5
ensure(0 < 2 * k &&... | ./gen -n 10 -k 2 -type random
./gen -n 10 -k 2 -type max_absurdity
./gen -n 10 -k 2 -type min_absurdity
./gen -n 10 -k 2 -type all_same
./gen -n 10 -k 2 -type increasing
./gen -n 10 -k 2 -type decreasing
./gen -n 10 -k 2 -type multiple_optimal
./gen -n 100 -k 5 -type random
./gen -n 100 -k 5 -type max_absurdity
./gen ... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(2, 200000, "n");
inf.readSpace();
int k = inf.readInt(1, n / 2, "k");
inf.readEoln();
vector<int> x = inf.readInts(n, 1, 1000000000, "x_i");... | n, k = map(int, input().split())
a = list(map(int, input().split()))
dp = [0]
for i in range(n):
dp.append(dp[i] + a[i])
ans1 = 0
ans2 = 0
b = 0
pb = 0
z = 0
for i in range(n - 2 * k + 1, 0, -1):
curb = dp[i + 2 * k - 1] - dp[i + k - 1]
if curb >= b:
b = curb
pb = i + k
cura = dp[i + k... | n, k = map(int, input().split())
a = list(map(int, input().split()))
dp = [0]
for i in range(n):
dp.append(dp[i] + a[i])
ans1 = 0
ans2 = 0
b = 0
pb = 0
z = 0
for i in range(n - 2 * k + 1, 0, -1):
curb = dp[i + 2 * k - 1] - dp[i + k - 1]
if curb >= b:
b = curb
pb = i + k
cura = dp[i + k... | 668 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmprk25s8a8.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Missing module docstring",
"check_name": "missing-module-docstring",
"category": "readability",
"message_identity": "missing-module-docstring::Missing module docstri... | [
{
"tool": "pylint",
"file": "/tmp/tmpe5bn4zzx.py",
"line": 24,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 1,
"revised_total_messages": 2,
"old_messages_remaining": 1,
"new_messages_count": 1,
"mrr_at_pass": -1,
"new_msg_per_sample_at_pass": 1,
"line_churn_at_pass": 1.6666666667,
"original_loc": 24,
"revised_loc": 24,
"added_lines": 20,
"deleted_lines": 20,
"category_mrr"... | null |
38_C_java_0 | 38_C | train | java | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
Integer[] miarray = new Integer[n];
int l = scan.nextInt();
int maximo = 0;
int resultado = 0;
int valor = n;
for(int i = 0; i < n; i++)
miarray[i] = s... | [
{
"tool": "pmd",
"file": "/tmp/tmpm2w_ldqu.java",
"line": 9,
"column": 19,
"severity": "warning",
"message_text": "The initializer for variable 'resultado' is never used (overwritten on line 20)",
"check_name": "UnusedAssignment",
"category": "readability",
"message_identity": "U... | 5 | 38 | false | Codeforces | Blinds | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int l = opt<int>("l", 1);
string type = opt<string>("type", "random");
vector<int> a(n);
if (type == "random") {
for (int i = 0; i ... | ./gen -n 1 -l 1 -type random
./gen -n 1 -l 1 -type max_ai
./gen -n 1 -l 1 -type min_ai
./gen -n 1 -l 1 -type ai_equals_l
./gen -n 1 -l 1 -type l_gt_ai
./gen -n 10 -l 1 -type random
./gen -n 10 -l 1 -type max_ai
./gen -n 10 -l 1 -type min_ai
./gen -n 10 -l 1 -type ai_equals_l
./gen -n 10 -l 1 -type l_gt_ai
./gen -n 10... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 100, "n");
inf.readSpace();
int l = inf.readInt(1, 100, "l");
inf.readEoln();
vector<int> a = inf.readInts(n, 1, 100, "a_i");
inf.re... | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
Integer[] miarray = new Integer[n];
int l = scan.nextInt();
int maximo = 0;
int resultado;
int valor = n;
... | ```java
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
Integer[] miarray = new Integer[n];
int l = scan.nextInt();
int maximo = 0;
int resultado;
int valor = ... | 997 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpm2w_ldqu.java",
"line": 9,
"column": 19,
"severity": "warning",
"message_text": "The initializer for variable 'resultado' is never used (overwritten on line 20)",
"check_name": "UnusedAssignment",
"category": "readability",
"message_identity": "U... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
448_E_py3_0 | 448_E | train | py3 | from __future__ import print_function
maxx = 100000
n, m = map(int, input().split())
a = []
a.clear()
def dfs(x, y):
global maxx
if maxx == 0 :
return
if x == 0 or y == m :
maxx -= 1
print(a[x],' ',end="")
return
for d in range(x + 1):
if a[x] % a[d] == 0:
... | [
{
"tool": "pylint",
"file": "/tmp/tmp6x123gr6.py",
"line": 10,
"column": 14,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"... | 13 | 30 | true | Codeforces | Divisors | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
// Function to generate a large prime number less than 1e12
long long generate_large_prime() {
// Precomputed list of large prime numbers less than 1e12
vector<long long> primes = {
9999999967LL, 9999999971LL, 9999999973LL, 9999999973LL... | # Generate small X and small k
./gen -type small
# Generate several small test cases
./gen -type small
./gen -type small
./gen -type small
# Generate large X and small k
./gen -type largeX
./gen -type largeX
./gen -type largeX
# Generate small X and large k
./gen -type largeK
./gen -type largeK
./gen... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
long long X = inf.readLong(1LL, 1'000'000'000'000LL, "X");
inf.readSpace();
long long k = inf.readLong(0LL, 1'000'000'000'000'000'000LL, "k");
inf.readEoln();
in... | from __future__ import print_function
MAX_COUNT = 100000
n, m = map(int, input().split())
a = []
def dfs(x, y):
global MAX_COUNT
if not MAX_COUNT:
return
if not x or y == m:
MAX_COUNT -= 1
print(a[x], ' ', end="")
return
for d in range(x + 1):
if not a[x] % a[d... | from __future__ import print_function
MAX_COUNT = 100000
n, m = map(int, input().split())
a = []
def dfs(x, y):
global MAX_COUNT
if not MAX_COUNT:
return
if not x or y == m:
MAX_COUNT -= 1
print(a[x], ' ', end="")
return
for d in range(x + 1):
if not a[x] % a[d... | 1,168 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmp6x123gr6.py",
"line": 10,
"column": 14,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"... | [
{
"tool": "pylint",
"file": "/tmp/tmpqcufe1pr.py",
"line": 37,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 13,
"revised_total_messages": 5,
"old_messages_remaining": 4,
"new_messages_count": 1,
"mrr_at_pass": 0.6153846154,
"new_msg_per_sample_at_pass": 1,
"line_churn_at_pass": 1.1515151515,
"original_loc": 33,
"revised_loc": 37,
"added_lines": 21,
"deleted_lines": 17,
"ca... | null |
450_A_java_0 | 450_A | train | java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int m = in.nextInt();
int a [] = new int [n];
for ( int i = 0; i < n; i++){
int aux = in.nextInt();
a[i]= aux % m > 0? aux / m : aux / m + 1; ... | [
{
"tool": "pmd",
"file": "/tmp/tmpvo7ez806.java",
"line": 20,
"column": 3,
"severity": "warning",
"message_text": "This statement should have braces",
"check_name": "ControlStatementBraces",
"category": "readability",
"message_identity": "ControlStatementBraces::This statement sh... | 1 | 20 | false | Codeforces | Jzzhu and Children | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int m = opt<int>("m");
string type = opt<string>("type", "random");
vector<int> ai(n);
if (type == "random") {
for (int i = 0; i <... | ./gen -n 1 -m 1 -type ai_equal_1
./gen -n 1 -m 100 -type ai_equal_100
./gen -n 2 -m 1 -type increasing_ai
./gen -n 2 -m 100 -type decreasing_ai
./gen -n 10 -m 10 -type random
./gen -n 10 -m 10 -type ai_equal_m
./gen -n 10 -m 10 -type ai_equal_m_minus_1
./gen -n 10 -m 10 -type ai_equal_m_plus_1
./gen -n 50 -m 50 -typ... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 100, "n");
inf.readSpace();
int m = inf.readInt(1, 100, "m");
inf.readEoln();
inf.readInts(n, 1, 100, "a_i");
inf.readEoln();
i... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int m = in.nextInt();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
int aux = in.ne... | ```java
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int m = in.nextInt();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
int aux... | 665 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpvo7ez806.java",
"line": 20,
"column": 3,
"severity": "warning",
"message_text": "This statement should have braces",
"check_name": "ControlStatementBraces",
"category": "readability",
"message_identity": "ControlStatementBraces::This statement sh... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
482_C_cpp_0 | 482_C | test | cpp | #include <bits/stdc++.h>
using namespace std;
const int maxn = 55;
int n, m;
char s[maxn][30];
long double ans;
long double F[(1 << 20) + 5];
long long Choice[(1 << 20) + 5];
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++) scanf("%s", s[i]);
if (n == 1) {
printf("0\n");
return 0;
}
m = strl... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpsdjr3co4.cpp",
"line": 10,
"column": 3,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-uncheck... | 8 | 47 | true | Codeforces | Game with Strings | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int m = opt<int>("m");
string type = opt<string>("type", "random");
vector<string> strings(n);
if (type == "random") {
// Generate n r... | ./gen -n 1 -m 1 -type random
./gen -n 1 -m 20 -type random
./gen -n 50 -m 1 -type random
./gen -n 50 -m 20 -type random
./gen -n 2 -m 5 -type one_diff
./gen -n 10 -m 10 -type one_diff
./gen -n 50 -m 15 -type one_diff
./gen -n 50 -m 20 -type one_diff
./gen -n 2 -m 5 -type full_diff
./gen -n 10 -m 5 -type full_diff
./g... | #include "testlib.h"
using namespace std;
const double EPS = 1E-9;
int main(int argc, char *argv[]) {
setName("compare two sequences of doubles, max absolute or relative error = %.10f", EPS);
registerTestlibCmd(argc, argv);
int n = 0;
double j = 0, p = 0;
while (!ans.seekEof()) {
... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 50, "n");
inf.readEoln();
vector<string> s(n);
set<string> s_set;
int len = -1;
for (int i = 0; i < n; i++) {
s[i] = inf.rea... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 55;
int n, m;
char s[maxn][30];
long double ans;
long double F[(1 << 20) + 5];
long long Choice[(1 << 20) + 5];
int main() {
if (scanf("%d", &n) != 1) {
return 1;
}
for (int i = 1; i <= n; i++) {
scanf("%s", s[i]);
}
if (n == 1) {
prin... | ```cpp
#include <bits/stdc++.h>
using namespace std;
const int maxn = 55;
int n, m;
char s[maxn][30];
long double ans;
long double F[(1 << 20) + 5];
long long Choice[(1 << 20) + 5];
int main() {
if (scanf("%d", &n) != 1) {
return 1;
}
for (int i = 1; i <= n; i++) {
scanf("%s", s[i]);
}
if (n == 1) {
... | 1,568 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpsdjr3co4.cpp",
"line": 10,
"column": 3,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-uncheck... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp7okxo61p.cpp",
"line": 10,
"column": 7,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-uncheck... | {
"original_total_messages": 8,
"revised_total_messages": 1,
"old_messages_remaining": 1,
"new_messages_count": 0,
"mrr_at_pass": 0.875,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.6382978723,
"original_loc": 47,
"revised_loc": 55,
"added_lines": 19,
"deleted_lines": 11,
"category_m... | null |
484_A_java_0 | 484_A | train | java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Main {
public static boolean[] distribute(long n) {
final int bitAmount = 64;
boolean[] bits = new boolean[bitAmount];
for (int i = 0; i < bitAmount; i++)... | [
{
"tool": "pmd",
"file": "/tmp/tmpa5f8524h.java",
"line": 28,
"column": 24,
"severity": "warning",
"message_text": "The method 'main(String[])' has a cognitive complexity of 17, current threshold is 15",
"check_name": "CognitiveComplexity",
"category": "modernize",
"message_ident... | 3 | 57 | false | Codeforces | Bits | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type");
printf("%d\n", n);
if (type == "random") {
for (int i = 0; i < n; ++i) {
// Generate ran... | ./gen -n 1 -type minrange
./gen -n 1 -type random
./gen -n 1 -type maxrange
./gen -n 1 -type edgecaselower
./gen -n 1 -type edgecaseupper
./gen -n 10 -type random
./gen -n 10 -type maxrange
./gen -n 10 -type minrange
./gen -n 10 -type edgecaselower
./gen -n 10 -type edgecaseupper
./gen -n 10 -type poweroftwoboundary
.... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 10000, "n");
inf.readEoln();
for (int i = 0; i < n; ++i) {
long long l = inf.readLong(0LL, 1000000000000000000LL, "li");
inf.readSp... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static boolean[] distribute(long n) {
final int bitAmount = 64;
boolean[] bits = new boolean[bitAmount];
for (int i = 0; i < bitAmount; i++) {
bits[i] = (... | ```java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static boolean[] distribute(long n) {
final int bitAmount = 64;
boolean[] bits = new boolean[bitAmount];
for (int i = 0; i < bitAmount; i++) {
bit... | 1,377 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpa5f8524h.java",
"line": 28,
"column": 24,
"severity": "warning",
"message_text": "The method 'main(String[])' has a cognitive complexity of 17, current threshold is 15",
"check_name": "CognitiveComplexity",
"category": "modernize",
"message_ident... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
489_D_py3_0 | 489_D | train | py3 | # self.author = Fuad Ashraful Mehmet ,CSE-UAP
from sys import stdin
input=stdin.readline
n,m=map(int,input().split())
g={x:[] for x in range(1,n+1)}
for _ in range(m):
a,b=map(int,input().split())
g[a].append(b)
res=0
for i in range(1,n+1):
d={}
for j in g[i]:
for k in g[j]:
d... | [
{
"tool": "pylint",
"file": "/tmp/tmp9ek8nyac.py",
"line": 22,
"column": 0,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"t... | 6 | 35 | true | Codeforces | Unbearable Controversy of Being | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int m = opt<int>("m", -1); // If m is -1, it will be adjusted accordingly.
string type = opt<string>("type", "random_sparse");
int layers = opt<i... | ./gen -n 1 -type empty
./gen -n 2 -type empty
./gen -n 2 -type chain
./gen -n 3 -type chain
./gen -n 5 -type minimal_rhombi
./gen -n 10 -type chain
./gen -n 10 -type star_in
./gen -n 10 -type star_out
./gen -n 10 -type full
./gen -n 5 -type random_sparse
./gen -n 5 -type random_dense
./gen -n 100 -type random_sparse
./... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 3000, "n");
inf.readSpace();
int m = inf.readInt(0, 30000, "m");
inf.readEoln();
set< pair<int,int> > edges;
for (int i = 0; i < m; i++... | from sys import stdin
def main() -> None:
"""Read graph and count number of length-2 path pairs."""
read_input = stdin.readline
n, m = map(int, read_input().split())
graph = {x: [] for x in range(1, n + 1)}
for _ in range(m):
a, b = map(int, read_input().split())
graph[a].append(b... | from sys import stdin
def main() -> None:
"""Read graph and count number of length-2 path pairs."""
read_input = stdin.readline
n, m = map(int, read_input().split())
graph = {x: [] for x in range(1, n + 1)}
for _ in range(m):
a, b = map(int, read_input().split())
graph[a].append(b... | 807 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmp9ek8nyac.py",
"line": 22,
"column": 0,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"t... | [
{
"tool": "pylint",
"file": "/tmp/tmpci0vpx2l.py",
"line": 30,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 6,
"revised_total_messages": 2,
"old_messages_remaining": 2,
"new_messages_count": 0,
"mrr_at_pass": 0.6666666667,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 1.2608695652,
"original_loc": 46,
"revised_loc": 30,
"added_lines": 21,
"deleted_lines": 37,
"cat... | null |
48_D_cpp_0 | 48_D | train | cpp | #include <bits/stdc++.h>
using namespace std;
void solve(long long testcase) {
long long n;
cin >> n;
vector<long long> v(n);
map<long long, vector<long long>> mp;
for (long long i = 0; i < n; i++) {
cin >> v[i];
mp[v[i]].push_back(i);
}
vector<long long> a, b;
long long c = 1;
for (auto p : m... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp3s75w63b.cpp",
"line": 14,
"column": 13,
"severity": "warning",
"message_text": "loop variable is copied but only used as const reference; consider making it a const reference",
"check_name": "performance-for-range-copy",
"category": "performa... | 11 | 53 | true | Codeforces | Permutations | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
vector<int> array;
if (type == "random") {
int k = rnd.next(1, min(n, 1000));
// Ge... | ./gen -n 10 -type random
./gen -n 10 -type single_permutation
./gen -n 10 -type many_permutations
./gen -n 10 -type impossible
./gen -n 100 -type random
./gen -n 100 -type single_permutation
./gen -n 100 -type impossible
./gen -n 1000 -type random
./gen -n 1000 -type many_permutations
./gen -n 1000 -type impossible
... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerTestlibCmd(argc, argv);
int n = inf.readInt(); // Read n from the input file
vector<int> a(n);
for (int i = 0; i < n; i++) {
a[i] = inf.readInt();
}
int k = ouf.readInt(); // ... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 100000, "n");
inf.readEoln();
string line = inf.readLine();
// Check no leading or trailing spaces
if (!line.empty() && (line.front() =... | #include <bits/stdc++.h>
using namespace std;
void solve(long long testcase) {
long long n;
cin >> n;
vector<long long> v(n);
map<long long, vector<long long>> mp;
for (long long i = 0; i < n; i++) {
cin >> v[i];
mp[v[i]].push_back(i);
}
vector<long long> a, b;
long long c = 1;
for (const auto... | ```cpp
#include <bits/stdc++.h>
using namespace std;
void solve(long long testcase) {
long long n;
cin >> n;
vector<long long> v(n);
map<long long, vector<long long>> mp;
for (long long i = 0; i < n; i++) {
cin >> v[i];
mp[v[i]].push_back(i);
}
vector<long long> a, b;
long long c = 1;
for (con... | 1,435 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp3s75w63b.cpp",
"line": 14,
"column": 13,
"severity": "warning",
"message_text": "loop variable is copied but only used as const reference; consider making it a const reference",
"check_name": "performance-for-range-copy",
"category": "performa... | [] | {
"original_total_messages": 11,
"revised_total_messages": 0,
"old_messages_remaining": 0,
"new_messages_count": 0,
"mrr_at_pass": 1,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.5849056604,
"original_loc": 53,
"revised_loc": 64,
"added_lines": 21,
"deleted_lines": 10,
"category_mrr"... | null |
538_D_py3_0 | 538_D | train | py3 | def main():
n = int(input())
d = [input() for i in range(n)]
figures = []
for i in range(n):
for j in range(n):
if d[i][j] == 'o':
figures.append((i, j))
result = [['x' for i in range(2 * n - 1)] for j in range(2 * n - 1)]
result[n - 1][n - 1] = 'o'
... | [
{
"tool": "pylint",
"file": "/tmp/tmp3_8sezi_.py",
"line": 4,
"column": 0,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"to... | 6 | 30 | true | Codeforces | Weird Chess | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
// Initialize the empty board
vector<string> board(n, string(n, '.'));
if (type == "rook") {
... | ./gen -n 1 -type minimal_yes
./gen -n 2 -type minimal_yes
./gen -n 1 -type minimal_no
./gen -n 2 -type minimal_no
./gen -n 5 -type rook
./gen -n 5 -type bishop
./gen -n 5 -type knight
./gen -n 5 -type queen
./gen -n 10 -type rook
./gen -n 10 -type bishop
./gen -n 10 -type knight
./gen -n 10 -type queen
./gen -n 15 -typ... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerTestlibCmd(argc, argv);
int n = inf.readInt(1, 50, "n");
vector<string> board(n);
for (int i = 0; i < n; ++i) {
board[i] = inf.readToken(format("[ox.]{%d}", n).c_str(), format("board l... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 50, "n");
inf.readEoln();
int total_o = 0;
for (int i = 0; i < n; i++) {
string s = inf.readLine();
ensuref(int(s.size()) == n,... | def main():
"""Read board, compute attack pattern, and output result."""
n = int(input())
board = [input() for _ in range(n)]
figures = []
for i in range(n):
for j in range(n):
if board[i][j] == 'o':
figures.append((i, j))
size = 2 * n - 1
result = [['x'... | def main():
"""Read board, compute attack pattern, and output result."""
n = int(input())
board = [input() for _ in range(n)]
figures = []
for i in range(n):
for j in range(n):
if board[i][j] == 'o':
figures.append((i, j))
size = 2 * n - 1
result = [['x'... | 1,009 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmp3_8sezi_.py",
"line": 4,
"column": 0,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"to... | [
{
"tool": "pylint",
"file": "/tmp/tmpwuxuzkpn.py",
"line": 41,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 6,
"revised_total_messages": 3,
"old_messages_remaining": 2,
"new_messages_count": 1,
"mrr_at_pass": 0.5,
"new_msg_per_sample_at_pass": 1,
"line_churn_at_pass": 0.8571428571,
"original_loc": 35,
"revised_loc": 41,
"added_lines": 18,
"deleted_lines": 12,
"category_mrr... | null |
546_E_cpp_0 | 546_E | train | cpp | #include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int m, n, S, T;
int belong[700], first[700], dep[700], q[700], k;
int v1[700], v2[700];
int mat[700][700];
struct Edge {
int x, y, next, cap;
Edge(int x = 0, int y = 0, int next = 0, int cap = 0)
: x(x), y(y), next(next), cap(cap) {}
} ... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpmud8mkry.cpp",
"line": 10,
"column": 8,
"severity": "warning",
"message_text": "4 adjacent parameters of 'Edge' of similar type ('int') are easily swapped by mistake",
"check_name": "bugprone-easily-swappable-parameters",
"category": "bugprone... | 16 | 120 | false | Codeforces | Soldier and Traveling | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
/*
This generator produces a single test case for the problem:
- n cities, numbered 1..n
- m roads (bidirectional)
- a_i soldiers initially in city i
- b_i soldiers required finally in city i
- 1 <= n <= 100
- 0 <= m <= 200
... | # Below are approximately 20 DISTINCT commands to run the generator.
# Each command will print exactly one test case to STDOUT.
# 1) Smallest n = 1, no edges, all-zero
./gen -n 1 -type all-zero
# 2) n=2, let's do all-zero again
./gen -n 2 -type all-zero
# 3) n=2, random with possible edges
./gen -n 2 -type random
#... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 105;
int n, m;
int ai[MAX_N], bi[MAX_N];
set<int> adj[MAX_N];
int M[MAX_N][MAX_N];
int main(int argc, char* argv[]) {
registerTestlibCmd(argc, argv);
// Read input data
n = inf.readInt(1, 100, "n");
m = inf.readInt(... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 100, "n");
inf.readSpace();
int m = inf.readInt(0, 200, "m");
inf.readEoln();
vector<int> a = inf.readInts(n, 0, 100, "a");
inf.readEo... | #include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int m, n, S, T;
int belong[700], first[700], dep[700], q[700], k;
int v1[700], v2[700];
int mat[700][700];
struct Edge {
int x, y, next, cap;
Edge(int x_val, int y_val, int next_val, int cap_val)
: x(x_val), y(y_val), next(next_val), ca... | ```cpp
#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int m, n, S, T;
int belong[700], first[700], dep[700], q[700], k;
int v1[700], v2[700];
int mat[700][700];
struct Edge {
int x, y, next, cap;
Edge(int x_val, int y_val, int next_val, int cap_val)
: x(x_val), y(y_val), next(next_v... | 2,929 | null | true | null | false | /tmp/tmpxpufgkil.cpp:12:16: error: no matching function for call to ‘Edge::Edge()’
12 | } e[200010 << 1];
| ^
/tmp/tmpxpufgkil.cpp:10:3: note: candidate: ‘Edge::Edge(int, int, int, int)’
10 | Edge(int x_val, int y_val, int next_val, int cap_val)
| ^~~~
/tmp/tmpxpufgkil.cpp:10:3: not... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpmud8mkry.cpp",
"line": 10,
"column": 8,
"severity": "warning",
"message_text": "4 adjacent parameters of 'Edge' of similar type ('int') are easily swapped by mistake",
"check_name": "bugprone-easily-swappable-parameters",
"category": "bugprone... | [] | null | null |
570_A_java_0 | 570_A | valid | java |
import java.util.*;
import java.io.*;
public class Codeforces {
public static void main(String[] args) throws IOException {
Reader.init(System.in);
int n = Reader.nextInt(), m = Reader.nextInt();
int max = 0, index = 0;
for(int i = 0; i < m; i++){
for(int j = 0; j ... | [
{
"tool": "pmd",
"file": "/tmp/tmpn58q_wzi.java",
"line": 30,
"column": 27,
"severity": "warning",
"message_text": "Do not use non-final non-private static fields",
"check_name": "MutableStaticState",
"category": "modernize",
"message_identity": "MutableStaticState::Do not use no... | 12 | 65 | false | Codeforces | Elections | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int m = opt<int>("m");
string type = opt<string>("type", "random");
const long long total_votes_limit = 1000000000LL;
// Maximum votes per ... | ./gen -n 1 -m 1 -type random
./gen -n 2 -m 2 -type random
./gen -n 10 -m 10 -type random
./gen -n 100 -m 100 -type random
./gen -n 5 -m 5 -type tie_in_city
./gen -n 20 -m 20 -type tie_in_city
./gen -n 50 -m 50 -type tie_in_city
./gen -n 5 -m 5 -type tie_overall
./gen -n 20 -m 20 -type tie_overall
./gen -n 50 -m 50 -t... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 100, "n");
inf.readSpace();
int m = inf.readInt(1, 100, "m");
inf.readEoln();
long long total_votes = 0;
for (int i = 0; i < m; i++) {... | import java.util.*;
import java.io.*;
public class Codeforces {
public static void main(String[] args) throws IOException {
Reader.init(System.in);
int n = Reader.nextInt(), m = Reader.nextInt();
int max = 0, index = 0;
for (int i = 0; i < m; i++) {
for (int j = 0; j < ... | ```java
import java.util.*;
import java.io.*;
public class Codeforces {
public static void main(String[] args) throws IOException {
Reader.init(System.in);
int n = Reader.nextInt(), m = Reader.nextInt();
int max = 0, index = 0;
for (int i = 0; i < m; i++) {
for (int j =... | 1,444 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpn58q_wzi.java",
"line": 30,
"column": 27,
"severity": "warning",
"message_text": "Do not use non-final non-private static fields",
"check_name": "MutableStaticState",
"category": "modernize",
"message_identity": "MutableStaticState::Do not use no... | [] | null | {
"pass_at_1": false,
"compile_ok": false,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
590_A_py3_0 | 590_A | train | py3 | def solve():
N = int(input())
A = list(map(int, input().split()))
A.append(A[-1])
ma = 0
s = p = 0
for i in range(1, len(A)):
if A[i] != A[p]:
p = i
continue
else:
e = p
ma = max(ma, (p - s) // 2)
if A[s] == A[e]:
... | [
{
"tool": "pylint",
"file": "/tmp/tmplynkndnm.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Missing module docstring",
"check_name": "missing-module-docstring",
"category": "readability",
"message_identity": "missing-module-docstring::Missing module docstri... | 6 | 27 | true | Codeforces | Median Smoothing | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
vector<int> a(n);
if (type == "random") {
for (int i = 0; i < n; ++i) {
a[i] = ... | # Small test cases
./gen -n 3 -type all_zero
./gen -n 3 -type all_one
./gen -n 3 -type alternating
./gen -n 3 -type random
# Medium test cases
./gen -n 10 -type all_zero
./gen -n 10 -type all_one
./gen -n 10 -type alternating
./gen -n 10 -type random
# Max steps test cases
./gen -n 20 -type max_steps
./gen -n 50 -typ... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(3, 500000, "n");
inf.readEoln();
vector<int> a = inf.readInts(n, 0, 1, "a_i");
inf.readEoln();
inf.readEof();
return 0;
}
| def solve():
"""Read sequence, compute max distance and fill colors."""
_ = int(input())
arr = list(map(int, input().split()))
arr.append(arr[-1])
ma = 0
s = p = 0
for i in range(1, len(arr)):
if arr[i] != arr[p]:
p = i
continue
e = p
ma = max... | def solve():
"""Read sequence, compute max distance and fill colors."""
_ = int(input())
arr = list(map(int, input().split()))
arr.append(arr[-1])
ma = 0
s = p = 0
for i in range(1, len(arr)):
if arr[i] != arr[p]:
p = i
continue
e = p
ma = max... | 871 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmplynkndnm.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Missing module docstring",
"check_name": "missing-module-docstring",
"category": "readability",
"message_identity": "missing-module-docstring::Missing module docstri... | [
{
"tool": "pylint",
"file": "/tmp/tmp6dvux619.py",
"line": 32,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 6,
"revised_total_messages": 2,
"old_messages_remaining": 1,
"new_messages_count": 1,
"mrr_at_pass": 0.6666666667,
"new_msg_per_sample_at_pass": 1,
"line_churn_at_pass": 1.1875,
"original_loc": 32,
"revised_loc": 32,
"added_lines": 19,
"deleted_lines": 19,
"category_... | null |
596_C_py3_0 | 596_C | train | py3 | n=int(input())
a=[]
sa=0
sw=0
for i in range(n):
c=list(map(int,input().split()))
a.append(c)
w=list(map(int,input().split()))
a1=[0]*n
for i in range(n):
a1[i]=a[i][1]-a[i][0]
for i in range(n):
sa+=a1[i]
sw+=w[i]
if sa==sw:
print('YES')
for i in w:
for j in range(n):
i... | [
{
"tool": "pylint",
"file": "/tmp/tmpg9mxkich.py",
"line": 20,
"column": 24,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"... | 2 | 23 | true | Codeforces | Wilbur and Points | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
vector<pair<int,int>> points;
if(type == "line") {
// Generate points along line y=0
... | ./gen -n 1 -type line
./gen -n 2 -type line
./gen -n 10 -type line
./gen -n 100 -type line
./gen -n 1000 -type line
./gen -n 10000 -type line
./gen -n 100000 -type line
./gen -n 1 -type rectangle
./gen -n 2 -type rectangle
./gen -n 10 -type rectangle
./gen -n 100 -type rectangle
./gen -n 1000 -type rectangle
./gen -n ... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerTestlibCmd(argc, argv);
int n = inf.readInt();
set<pair<int, int>> input_points;
for (int i = 0; i < n; i++) {
int x = inf.readInt();
int y = inf.readInt();
input_point... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
// Hash function for pair<int, int>
struct pair_hash {
size_t operator()(const pair<int, int> &p) const {
return hash<int>()(p.first) ^ (hash<int>()(p.second) << 1);
}
};
int main(int argc, char* argv[]) {
registerValidation(argc, ... | n = int(input())
a = []
sa = 0
sw = 0
for _ in range(n):
c = list(map(int, input().split()))
a.append(c)
w = list(map(int, input().split()))
a1 = [0] * n
for i in range(n):
a1[i] = a[i][1] - a[i][0]
for i in range(n):
sa += a1[i]
sw += w[i]
if sa == sw:
print('YES')
for i in w:
for ... | n = int(input())
a = []
sa = 0
sw = 0
for _ in range(n):
c = list(map(int, input().split()))
a.append(c)
w = list(map(int, input().split()))
a1 = [0] * n
for i in range(n):
a1[i] = a[i][1] - a[i][0]
for i in range(n):
sa += a1[i]
sw += w[i]
if sa == sw:
print('YES')
for i in w:
for ... | 634 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmpg9mxkich.py",
"line": 20,
"column": 24,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"... | [
{
"tool": "pylint",
"file": "/tmp/tmpvcc_pd1m.py",
"line": 24,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 2,
"revised_total_messages": 2,
"old_messages_remaining": 1,
"new_messages_count": 1,
"mrr_at_pass": 0,
"new_msg_per_sample_at_pass": 1,
"line_churn_at_pass": 1.25,
"original_loc": 24,
"revised_loc": 24,
"added_lines": 15,
"deleted_lines": 15,
"category_mrr": {
"... | null |
630_B_py3_0 | 630_B | train | py3 | n, m = map(int, input().split())
q = 1.000000011
ans = n * (q ** m)
print(ans) | [
{
"tool": "pylint",
"file": "/tmp/tmpq1mtywur.py",
"line": 4,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
{... | 3 | 4 | true | Codeforces | Moore's Law | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n", -1); // If not provided, n = -1
int t = opt<int>("t", -1); // If not provided, t = -1
string type = opt<string>("type", "random");
// Constant... | ./gen -type t_zero
./gen -type t_zero
./gen -type t_zero -n 1000
./gen -type t_zero -n 10000
./gen -type t_small
./gen -type t_small
./gen -type t_small -n 1000
./gen -type t_small -n 10000
./gen -type t_large
./gen -type t_large
./gen -type t_large -n 1000
./gen -type t_large -n 10000
./gen -type n_min
./gen -type ... | #include "testlib.h"
#include <bits/stdc++.h>
int main(int argc, char* argv[]) {
registerTestlibCmd(argc, argv);
// Read the correct answer from the jury's answer file
double jury_ans = ans.readDouble();
// Read the participant's output
double participant_ans = ouf.readDouble();
// Ch... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1000, 10000, "n");
inf.readSpace();
int t = inf.readInt(0, 2000000000, "t");
inf.readEoln();
inf.readEof();
return 0;
}
| n, m = map(int, input().split())
Q = 1.000000011
ans = n * (Q ** m)
print(ans) | n, m = map(int, input().split())
Q = 1.000000011
ans = n * (Q ** m)
print(ans) | 438 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmpq1mtywur.py",
"line": 4,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
{... | [
{
"tool": "pylint",
"file": "/tmp/tmpkw8mysv5.py",
"line": 4,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
{... | {
"original_total_messages": 3,
"revised_total_messages": 2,
"old_messages_remaining": 2,
"new_messages_count": 0,
"mrr_at_pass": 0.3333333333,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 1,
"original_loc": 4,
"revised_loc": 4,
"added_lines": 2,
"deleted_lines": 2,
"category_mrr": {
... | null |
630_C_cpp_0 | 630_C | train | cpp | #include <bits/stdc++.h>
int main() {
int a, i, j, k = 1;
scanf("%d", &a);
for (i = 1; i <= a; i++) {
k = k * 2;
}
k = 2 * (k - 1);
printf("%d\n", k);
return 0;
}
| [
{
"tool": "clang-tidy",
"file": "/tmp/tmp7_a4yz60.cpp",
"line": 4,
"column": 3,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-unchecke... | 1 | 11 | true | Codeforces | Lucky Numbers | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n;
if (has_opt("n")) {
n = opt<int>("n");
} else {
string type = opt<string>("type", "random");
if (type == "min") {
n = 1;
}... | ./gen -n 1
./gen -n 2
./gen -n 10
./gen -n 29
./gen -n 30
./gen -n 31
./gen -n 32
./gen -n 40
./gen -n 50
./gen -n 55
./gen -type min
./gen -type max
./gen -type small
./gen -type small
./gen -type large
./gen -type large
./gen -type edge
./gen -type edge
./gen -type overflow
./gen -type overflow
./gen -type random
./... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 55, "n");
inf.readEoln();
inf.readEof();
return 0;
}
| #include <cstdio>
#include <cstdlib>
int main() {
int a, i, j, k = 1;
if (scanf("%d", &a) != 1) {
return EXIT_FAILURE;
}
for (i = 1; i <= a; i++) {
k = k * 2;
}
k = 2 * (k - 1);
printf("%d\n", k);
return 0;
} | #include <cstdio>
#include <cstdlib>
int main() {
int a, i, j, k = 1;
if (scanf("%d", &a) != 1) {
return EXIT_FAILURE;
}
for (i = 1; i <= a; i++) {
k = k * 2;
}
k = 2 * (k - 1);
printf("%d\n", k);
return 0;
} | 546 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp7_a4yz60.cpp",
"line": 4,
"column": 3,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-unchecke... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp75suuqdh.cpp",
"line": 6,
"column": 7,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-unchecke... | {
"original_total_messages": 1,
"revised_total_messages": 1,
"old_messages_remaining": 1,
"new_messages_count": 0,
"mrr_at_pass": 0,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.9090909091,
"original_loc": 11,
"revised_loc": 15,
"added_lines": 7,
"deleted_lines": 3,
"category_mrr": {... | null |
710_E_py3_0 | 710_E | valid | py3 | import math
import sys
sys.setrecursionlimit(1000047)
def minimalSteps(a, b, newA, newB):
INF = 9999999999999999999999999
best = INF
for i in range(35):
r = i*cy
k = 2 ** i
ai = a * k
bi = b * k
while k > 1:
if ai < newA:
y = ((newA - ai) // k)
ai += y * k
bi... | [
{
"tool": "pylint",
"file": "/tmp/tmpie184td_.py",
"line": 3,
"column": 0,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"to... | 12 | 31 | false | Codeforces | Generate a String | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n", -1);
int x = opt<int>("x", -1);
int y = opt<int>("y", -1);
string type = opt<string>("type", "random");
// Constants for maximum constraints... | # Test case with minimal n
./gen -type min_n
# Test case with maximum n
./gen -type max_n
# Test cases with n being a power of two
./gen -type power_of_two
# Test case with x less than y
./gen -type x_less_y -n 1000000
# Test case with x greater than y
./gen -type x_greater_y -n 1000000
# Test case with x equal to... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 10000000, "n");
inf.readSpace();
int x = inf.readInt(1, 1000000000, "x");
inf.readSpace();
int y = inf.readInt(1, 1000000000, "y");
... | import sys
sys.setrecursionlimit(1000047)
def minimal_steps(a, b, new_a, new_b):
"""Calculate minimal steps."""
inf = 9999999999999999999999999
best = inf
for i in range(35):
r = i * cy
k = 2 ** i
ai = a * k
bi = b * k
while k > 1:
if ai < new_a:
... | ```python
import sys
sys.setrecursionlimit(1000047)
def minimal_steps(a, b, new_a, new_b):
"""Calculate minimal steps."""
inf = 9999999999999999999999999
best = inf
for i in range(35):
r = i * cy
k = 2 ** i
ai = a * k
bi = b * k
while k > 1:
if ai <... | 1,073 | null | true | null | false | SyntaxError: invalid syntax (line 1) | [
{
"tool": "pylint",
"file": "/tmp/tmpie184td_.py",
"line": 3,
"column": 0,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"to... | [] | null | null |
721_E_java_0 | 721_E | train | java | import javafx.util.Pair;
import java.io.*;
import java.util.*;
/**
* Created by chao on 16/11/13.
*/
public class A {
public static void main(String[] args) throws IOException {
PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
BufferedReader br = new BufferedReader(new Inp... | [
{
"tool": "pmd",
"file": "/tmp/tmpaa6d9kkl.java",
"line": 18,
"column": 13,
"severity": "warning",
"message_text": "Avoid unused local variables such as 'L'.",
"check_name": "UnusedLocalVariable",
"category": "readability",
"message_identity": "UnusedLocalVariable::Avoid unused l... | 4 | 39 | false | Codeforces | Road to Home | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
long long L = opt<long long>("L");
int n = opt<int>("n");
long long p = opt<long long>("p");
long long t = opt<long long>("t");
string type = opt<string>("type", "ra... | ./gen -L 17 -n 2 -p 2 -t 6 -type edge_case1
./gen -L 12 -n 2 -p 2 -t 2 -type edge_case1
./gen -L 12 -n 2 -p 2 -t 4 -type edge_case1
./gen -L 1000 -n 0 -p 10 -t 5 -type no_light
./gen -L 1000 -n 1 -p 1000 -t 1 -type full_light
./gen -L 1000 -n 100 -p 10 -t 5 -type random
./gen -L 1000000 -n 10000 -p 1000 -t 1000 -type... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int L = inf.readInt(1, 1000000000, "L");
inf.readSpace();
int n = inf.readInt(0, 100000, "n");
inf.readSpace();
int p = inf.readInt(1, 1000000000, "p");
inf... | import java.io.*;
public class A {
public static void main(String[] args) throws IOException {
PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] nums = br.readLine().split(" ");
... | ```java
import java.io.*;
public class A {
public static void main(String[] args) throws IOException {
PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] nums = br.readLine().split(" ");
... | 1,028 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpaa6d9kkl.java",
"line": 18,
"column": 13,
"severity": "warning",
"message_text": "Avoid unused local variables such as 'L'.",
"check_name": "UnusedLocalVariable",
"category": "readability",
"message_identity": "UnusedLocalVariable::Avoid unused l... | [] | null | {
"pass_at_1": false,
"compile_ok": false,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
791_A_cpp_0 | 791_A | valid | cpp | #include <bits/stdc++.h>
int main() {
int l, b, i;
scanf("%d %d", &l, &b);
for (i = 1;; i++) {
l *= 3;
b *= 2;
if (l > b) break;
}
printf("%d\n", i);
return 0;
}
| [
{
"tool": "clang-tidy",
"file": "/tmp/tmpeeq9ecrc.cpp",
"line": 4,
"column": 3,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-unchecke... | 2 | 12 | true | Codeforces | Bear and Big Brother | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
string type = opt<string>("type", "random");
int a, b;
if (type == "random") {
a = rnd.next(1, 10);
b = rnd.next(a, 10); // ensure a ≤ b
} else if (type... | ./gen -type random
./gen -type random
./gen -type random
./gen -type random
./gen -type random
./gen -type equal
./gen -type equal
./gen -type equal
./gen -type min
./gen -type max
./gen -type a_less_b
./gen -type a_less_b
./gen -type a_less_b
./gen -type specific -a 1 -b 2
./gen -type specific -a 2 -b 2
./gen -typ... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int a = inf.readInt(1, 10, "a");
inf.readSpace();
int b = inf.readInt(a, 10, "b");
inf.readEoln();
inf.readEof();
return 0;
}
| #include <bits/stdc++.h>
int main() {
int l, b, i;
if (scanf("%d %d", &l, &b) != 2) {
return 1;
}
for (i = 1;; i++) {
l *= 3;
b *= 2;
if (l > b) {
break;
}
}
printf("%d\n", i);
return 0;
} | #include <bits/stdc++.h>
int main() {
int l, b, i;
if (scanf("%d %d", &l, &b) != 2) {
return 1;
}
for (i = 1;; i++) {
l *= 3;
b *= 2;
if (l > b) {
break;
}
}
printf("%d\n", i);
return 0;
} | 562 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpeeq9ecrc.cpp",
"line": 4,
"column": 3,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-unchecke... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpe95me94s.cpp",
"line": 4,
"column": 7,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-unchecke... | {
"original_total_messages": 2,
"revised_total_messages": 1,
"old_messages_remaining": 1,
"new_messages_count": 0,
"mrr_at_pass": 0.5,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.8333333333,
"original_loc": 12,
"revised_loc": 16,
"added_lines": 7,
"deleted_lines": 3,
"category_mrr":... | null |
79_D_cpp_0 | 79_D | train | cpp | #include <bits/stdc++.h>
using namespace std;
int n, k, m, tot, INF;
int cdy[10086], len[10086], wzy[10086];
int sdc[10086], dis[210][210], mindis[10086];
int dp[(1 << 22) + 1];
bool vis[10086];
queue<int> que;
void SPFA(int now) {
memset(mindis, 0x3f, sizeof mindis);
que.push(sdc[now]);
mindis[sdc[now]] = 0;
v... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpbel4p3s6.cpp",
"line": 8,
"column": 12,
"severity": "warning",
"message_text": "initialization of 'que' with static storage duration may throw an exception that cannot be caught",
"check_name": "bugprone-throwing-static-initialization",
"categ... | 16 | 61 | true | Codeforces | Password | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> generate_k_distinct_numbers(int k, int n) {
vector<int> xi;
if (k <= n / 2) {
set<int> xi_set;
while ((int)xi_set.size() < k) {
int val = rnd.next(1, n);
xi_set.insert(val);
}
... | # Random test cases with small n
./gen -n 10 -k 5 -l 5 -type random
./gen -n 15 -k 4 -l 7 -type random
./gen -n 20 -k 3 -l 6 -type random
# Random test cases with medium n
./gen -n 500 -k 5 -l 20 -type random
./gen -n 1000 -k 7 -l 50 -type random
./gen -n 2000 -k 10 -l 100 -type random
# Random test cases with large ... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 10000, "n");
inf.readSpace();
int k = inf.readInt(1, 10, "k");
inf.readSpace();
int l = inf.readInt(1, 100, "l");
inf.readEoln();
... | #include <bits/stdc++.h>
using namespace std;
int n, k, m, tot, INF;
int cdy[10086], len[10086], wzy[10086];
int sdc[10086], dis[210][210], mindis[10086];
int dp[(1 << 22) + 1];
bool vis[10086];
queue<int> que;
void SPFA(int now) {
memset(mindis, 0x3f, sizeof mindis);
que.push(sdc[now]);
mindis[sdc[now]] = 0;
v... | ```cpp
#include <bits/stdc++.h>
using namespace std;
int n, k, m, tot, INF;
int cdy[10086], len[10086], wzy[10086];
int sdc[10086], dis[210][210], mindis[10086];
int dp[(1 << 22) + 1];
bool vis[10086];
queue<int> que;
void SPFA(int now) {
memset(mindis, 0x3f, sizeof mindis);
que.push(sdc[now]);
mindis[sdc[now]] =... | 2,408 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpbel4p3s6.cpp",
"line": 8,
"column": 12,
"severity": "warning",
"message_text": "initialization of 'que' with static storage duration may throw an exception that cannot be caught",
"check_name": "bugprone-throwing-static-initialization",
"categ... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpgi5h_6xk.cpp",
"line": 8,
"column": 12,
"severity": "warning",
"message_text": "initialization of 'que' with static storage duration may throw an exception that cannot be caught",
"check_name": "bugprone-throwing-static-initialization",
"categ... | {
"original_total_messages": 16,
"revised_total_messages": 4,
"old_messages_remaining": 4,
"new_messages_count": 0,
"mrr_at_pass": 0.75,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.9672131148,
"original_loc": 61,
"revised_loc": 90,
"added_lines": 44,
"deleted_lines": 15,
"category_m... | null |
814_A_py3_0 | 814_A | test | py3 | import copy
def ins(s):
for i in range(1, len(s)):
val = s[i]
j = i - 1
while s[j] > val and j>=0:
s[j+1] = s[j]
j = j - 1
s[j+1] = val
return(s)
n=input()
n=n.split()
n[0]=int(n[0])
n[1]=int(n[1])
b=input()
a=input()
nb=[]
x=''
for i in range(len(b)):
... | [
{
"tool": "pylint",
"file": "/tmp/tmpxigo_cjk.py",
"line": 10,
"column": 0,
"severity": "warning",
"message_text": "Unnecessary parens after 'return' keyword",
"check_name": "superfluous-parens",
"category": "readability",
"message_identity": "superfluous-parens::Unnecessary pare... | 13 | 53 | true | Codeforces | An abandoned sentiment from past | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
void generateYesCase(int n, int k) {
vector<int> a(n);
// Generate a non-increasing sequence a'
int max_value = 200;
int min_value = 1;
vector<int> available_numbers;
for (int i = min_value; i <= max_value; ++i)
avail... | ./gen -n 2 -k 1 -ans Yes
./gen -n 2 -k 1 -ans No
./gen -n 3 -k 2 -ans Yes
./gen -n 3 -k 2 -ans No
./gen -n 5 -k 2 -ans Yes
./gen -n 5 -k 2 -ans No
./gen -n 10 -k 5 -ans Yes
./gen -n 10 -k 5 -ans No
./gen -n 20 -k 10 -ans Yes
./gen -n 20 -k 10 -ans No
./gen -n 50 -k 25 -ans Yes
./gen -n 50 -k 25 -ans No
./gen -n 1... | #include "testlib.h"
#include <string>
using namespace std;
const string YES = "YES";
const string NO = "NO";
int main(int argc, char *argv[]) {
setName("%s", ("multiple " + YES + "/" + NO + " (case insensitive)").c_str());
registerTestlibCmd(argc, argv);
int index = 0, yesCount = 0, noCount... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(2, 100, "n");
inf.readSpace();
int k = inf.readInt(1, n, "k");
inf.readEoln();
vector<int> a = inf.readInts(n, 0, 200, "a");
inf.readEol... | import copy
def ins(s):
for i in range(1, len(s)):
val = s[i]
j = i - 1
while s[j] > val and j >= 0:
s[j + 1] = s[j]
j = j - 1
s[j + 1] = val
return s
n = input()
n = n.split()
n[0] = int(n[0])
n[1] = int(n[1])
b = input()
a = input()
nb = []
x = ''
fo... | import copy
def ins(s):
for i in range(1, len(s)):
val = s[i]
j = i - 1
while s[j] > val and j >= 0:
s[j + 1] = s[j]
j = j - 1
s[j + 1] = val
return s
n = input()
n = n.split()
n[0] = int(n[0])
n[1] = int(n[1])
b = input()
a = input()
nb = []
x = ''
fo... | 1,359 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmpxigo_cjk.py",
"line": 10,
"column": 0,
"severity": "warning",
"message_text": "Unnecessary parens after 'return' keyword",
"check_name": "superfluous-parens",
"category": "readability",
"message_identity": "superfluous-parens::Unnecessary pare... | [
{
"tool": "pylint",
"file": "/tmp/tmpi6xkk9im.py",
"line": 57,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 13,
"revised_total_messages": 5,
"old_messages_remaining": 2,
"new_messages_count": 3,
"mrr_at_pass": 0.6153846154,
"new_msg_per_sample_at_pass": 3,
"line_churn_at_pass": 1.537037037,
"original_loc": 54,
"revised_loc": 57,
"added_lines": 43,
"deleted_lines": 40,
"cat... | null |
822_E_cpp_0 | 822_E | valid | cpp | #include <bits/stdc++.h>
using namespace std;
int n, m, t, x, st, ed, g, dy[32][100010], dab = 0;
long long h1[100010], h2[100010], hs1[100010], hs2[100010];
long long tt[100010], tt2[100010];
char s[100010], s2[100010];
int main() {
int i, j, k;
scanf("%d", &n);
scanf("%s", s + 1);
scanf("%d", &m);
scanf("%s... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp8lzfspu2.cpp",
"line": 9,
"column": 3,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-unchecke... | 8 | 71 | true | Codeforces | Liar | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int m = opt<int>("m");
int x = opt<int>("x");
string type = opt<string>("type", "random");
string s, t;
if (type == "identical") {
... | ./gen -n 1 -m 1 -x 1 -type identical
./gen -n 2 -m 2 -x 1 -type identical
./gen -n 1000 -m 1000 -x 1 -type identical
./gen -n 100000 -m 100000 -x 1 -type identical
./gen -n 10 -m 5 -x 1 -type t_substr_s
./gen -n 100 -m 50 -x 1 -type t_substr_s
./gen -n 1000 -m 500 -x 1 -type t_substr_s
./gen -n 100000 -m 50000 -x 1 -ty... | #include "testlib.h"
#include <string>
using namespace std;
const string YES = "YES";
const string NO = "NO";
int main(int argc, char *argv[]) {
setName("%s", ("multiple " + YES + "/" + NO + " (case insensitive)").c_str());
registerTestlibCmd(argc, argv);
int index = 0, yesCount = 0, noCount... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 100000, "n");
inf.readEoln();
string s = inf.readToken("[a-z]+", "s");
ensuref((int)s.length() == n, "Length of s must be n (%d), but is %d",... | #include <bits/stdc++.h>
using namespace std;
int n, m, t, x, st, ed, g, dy[32][100010], dab = 0;
long long h1[100010], h2[100010], hs1[100010], hs2[100010];
long long tt[100010], tt2[100010];
char s[100010], s2[100010];
int main() {
int i, j, k;
if (scanf("%d", &n) != 1) return 0;
scanf("%s", s + 1);
if (scanf... | ```cpp
#include <bits/stdc++.h>
using namespace std;
int n, m, t, x, st, ed, g, dy[32][100010], dab = 0;
long long h1[100010], h2[100010], hs1[100010], hs2[100010];
long long tt[100010], tt2[100010];
char s[100010], s2[100010];
int main() {
int i, j, k;
if (scanf("%d", &n) != 1) return 0;
scanf("%s", s + 1);
if... | 2,498 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp8lzfspu2.cpp",
"line": 9,
"column": 3,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-unchecke... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp4am7n95c.cpp",
"line": 9,
"column": 7,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-unchecke... | {
"original_total_messages": 8,
"revised_total_messages": 6,
"old_messages_remaining": 6,
"new_messages_count": 0,
"mrr_at_pass": 0.25,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.4084507042,
"original_loc": 71,
"revised_loc": 74,
"added_lines": 16,
"deleted_lines": 13,
"category_mr... | null |
828_A_cpp_0 | 828_A | train | cpp | #include <bits/stdc++.h>
using namespace std;
const long long infl = 0x3f3f3f3f3f3f3f3fLL;
const long long mod = (long long)1e9 + 7;
string to_string(string s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
template ... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpibvga5gv.cpp",
"line": 5,
"column": 25,
"severity": "warning",
"message_text": "the parameter 's' of type 'string' (aka 'basic_string<char>') is copied for each invocation but only used as a const reference; consider making it a const reference",
... | 9 | 69 | true | Codeforces | Restaurant Tables | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
// Read parameters
int n = opt<int>("n");
int a = opt<int>("a");
int b = opt<int>("b");
// Default type is "random" if not specified
string type = opt<string>("... | # 1) Minimal values, random distribution
./gen -n 1 -a 1 -b 1 -type random
# 2) Small input, all ones
./gen -n 5 -a 2 -b 2 -type allones
# 3) Small input, all twos
./gen -n 5 -a 2 -b 2 -type alltwos
# 4) Small input, mixed heavy ones
./gen -n 10 -a 5 -b 5 -type mixedheavyones
# 5) Small input, mixed heavy twos
./ge... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 200000, "n");
inf.readSpace();
int a = inf.readInt(1, 200000, "a");
inf.readSpace();
int b = inf.readInt(1, 200000, "b");
inf.readEoln... | #include <bits/stdc++.h>
using namespace std;
const long long infl = 0x3f3f3f3f3f3f3f3fLL;
const long long mod = (long long)1e9 + 7;
string to_string(const string& s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string(string(s)); }
string to_string(bool b) { return (b ? "true" : "false"); }
te... | ```cpp
#include <bits/stdc++.h>
using namespace std;
const long long infl = 0x3f3f3f3f3f3f3f3fLL;
const long long mod = (long long)1e9 + 7;
string to_string(const string& s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string(string(s)); }
string to_string(bool b) { return (b ? "true" : "false"... | 1,539 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpibvga5gv.cpp",
"line": 5,
"column": 25,
"severity": "warning",
"message_text": "the parameter 's' of type 'string' (aka 'basic_string<char>') is copied for each invocation but only used as a const reference; consider making it a const reference",
... | [] | {
"original_total_messages": 9,
"revised_total_messages": 0,
"old_messages_remaining": 0,
"new_messages_count": 0,
"mrr_at_pass": 1,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.3768115942,
"original_loc": 69,
"revised_loc": 71,
"added_lines": 14,
"deleted_lines": 12,
"category_mrr":... | null |
849_A_cpp_0 | 849_A | train | cpp | #include <bits/stdc++.h>
using namespace std;
long long modpow(long long a, long long b, long long m) {
long long c = 1;
while (b) {
if (b & 1) c = (c * a) % m;
b /= 2;
a = (a * a) % m;
}
return c;
}
long long i, j, k, n, m, arr[300005];
int main() {
cin >> n;
for (i = 0; i < n; i++) cin >> arr[... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpg14j4ld9.cpp",
"line": 3,
"column": 18,
"severity": "warning",
"message_text": "2 adjacent parameters of 'modpow' of similar type ('long long') are easily swapped by mistake",
"check_name": "bugprone-easily-swappable-parameters",
"category": "... | 3 | 22 | true | Codeforces | Odds and Ends | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
vector<int> a;
if (type == "random") {
a.resize(n);
for (int i = 0; i < n; ++i) {
... | ./gen -n 10 -type n_even
./gen -n 10 -type a1_even
./gen -n 10 -type an_even
./gen -n 10 -type n_odd_a1_an_odd
./gen -n 10 -type n_odd_a1_even_an_odd
./gen -n 10 -type n_odd_a1_odd_an_even
./gen -n 10 -type random
./gen -n 1 -type n_min1
./gen -n 100 -type n_max100
./gen -n 5 -type n_odd_a1_an_odd
./gen -n 5 -type n_... | #include "testlib.h"
#include <string>
using namespace std;
const string YES = "YES";
const string NO = "NO";
int main(int argc, char *argv[]) {
setName("%s", ("multiple " + YES + "/" + NO + " (case insensitive)").c_str());
registerTestlibCmd(argc, argv);
int index = 0, yesCount = 0, noCount... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 100, "n");
inf.readEoln();
vector<int> a = inf.readInts(n, 0, 100, "a_i");
inf.readEoln();
inf.readEof();
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
long long modpow(long long base, long long exponent, long long modulus) {
long long c = 1;
while (exponent) {
if (exponent & 1) {
c = (c * base) % modulus;
}
exponent /= 2;
base = (base * base) % modulus;
}
return c;
}
long long i, j, k, n, m, ... | ```cpp
#include <bits/stdc++.h>
using namespace std;
long long modpow(long long base, long long exponent, long long modulus) {
long long c = 1;
while (exponent) {
if (exponent & 1) {
c = (c * base) % modulus;
}
exponent /= 2;
base = (base * base) % modulus;
}
return c;
}
long long i, j, k,... | 799 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpg14j4ld9.cpp",
"line": 3,
"column": 18,
"severity": "warning",
"message_text": "2 adjacent parameters of 'modpow' of similar type ('long long') are easily swapped by mistake",
"check_name": "bugprone-easily-swappable-parameters",
"category": "... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpwt64xq42.cpp",
"line": 3,
"column": 18,
"severity": "warning",
"message_text": "2 adjacent parameters of 'modpow' of similar type ('long long') are easily swapped by mistake",
"check_name": "bugprone-easily-swappable-parameters",
"category": "... | {
"original_total_messages": 3,
"revised_total_messages": 1,
"old_messages_remaining": 1,
"new_messages_count": 0,
"mrr_at_pass": 0.6666666667,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.8181818182,
"original_loc": 22,
"revised_loc": 26,
"added_lines": 11,
"deleted_lines": 7,
"cate... | null |
864_D_java_0 | 864_D | train | java | import java.util.HashMap;
import java.util.PriorityQueue;
import java.util.Scanner;
public class D864Permutation {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
HashMap<Integer, Integer> hm = new HashMap<>();
boolean[] vis = new boolean[n + 1];
int[] ar... | [
{
"tool": "pmd",
"file": "/tmp/tmp5rbgllv4.java",
"line": 7,
"column": 21,
"severity": "warning",
"message_text": "The method 'main(String[])' has a cognitive complexity of 16, current threshold is 15",
"check_name": "CognitiveComplexity",
"category": "modernize",
"message_identi... | 6 | 44 | false | Codeforces | Make a Permutation! | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
vector<int> a(n);
if (type == "random") {
for (int i = 0; i < n; ++i) {
a[i] =... | ./gen -n 2 -type random
./gen -n 2 -type permutation
./gen -n 2 -type all_same
./gen -n 2 -type few_duplicates
./gen -n 2 -type missing_numbers
./gen -n 10 -type random
./gen -n 10 -type permutation
./gen -n 10 -type all_same
./gen -n 10 -type few_duplicates
./gen -n 10 -type missing_numbers
./gen -n 1000 -type rando... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(2, 200000, "n");
inf.readEoln();
vector<int> a = inf.readInts(n, 1, n);
inf.readEoln();
inf.readEof();
return 0;
}
| import java.util.HashMap;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
public class D864Permutation {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
Map<Integer, Integer> hm = ne... | ```java
import java.util.HashMap;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
public class D864Permutation {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
Map<Integer, Integer>... | 1,159 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmp5rbgllv4.java",
"line": 7,
"column": 21,
"severity": "warning",
"message_text": "The method 'main(String[])' has a cognitive complexity of 16, current threshold is 15",
"check_name": "CognitiveComplexity",
"category": "modernize",
"message_identi... | [] | null | {
"pass_at_1": false,
"compile_ok": false,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
902_A_py3_0 | 902_A | train | py3 | def main():
from collections import defaultdict
(n, m) = map(int, input().split(' '))
l = [0] * 101
for i in range(n):
(a, b) = map(int, input().split(' '))
for i in range(a + 1, b + 2):
l[i] += 1
for i in range(1, m + 1):
if l[i] == 0:
return False
... | [
{
"tool": "pylint",
"file": "/tmp/tmpdggh2fmr.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Missing module docstring",
"check_name": "missing-module-docstring",
"category": "readability",
"message_identity": "missing-module-docstring::Missing module docstri... | 5 | 13 | true | Codeforces | Visiting a Friend | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int m = opt<int>("m");
string type = opt<string>("type", "random");
vector<pair<int, int>> teleports;
if (type == "YES" || type == "possibl... | ./gen -n 1 -m 1 -type YES
./gen -n 1 -m 1 -type NO
./gen -n 2 -m 5 -type YES
./gen -n 2 -m 5 -type NO
./gen -n 3 -m 7 -type YES
./gen -n 3 -m 7 -type NO
./gen -n 10 -m 50 -type YES
./gen -n 10 -m 50 -type NO
./gen -n 10 -m 50 -type random
./gen -n 50 -m 70 -type YES
./gen -n 50 -m 70 -type NO
./gen -n 50 -m 70 -typ... | #include "testlib.h"
#include <string>
using namespace std;
const string YES = "YES";
const string NO = "NO";
int main(int argc, char *argv[]) {
setName("%s", ("multiple " + YES + "/" + NO + " (case insensitive)").c_str());
registerTestlibCmd(argc, argv);
int index = 0, yesCount = 0, noCount... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 100, "n");
inf.readSpace();
int m = inf.readInt(1, 100, "m");
inf.readEoln();
int prev_ai = -1;
for (int i = 1; i <= n; i++) {
... | def main():
"""Read intervals and check coverage of [1, m]."""
n, m = map(int, input().split())
l = [0] * 101
for _ in range(n):
a, b = map(int, input().split())
for i in range(a + 1, b + 2):
l[i] += 1
for i in range(1, m + 1):
if not l[i]:
return Fals... | def main():
"""Read intervals and check coverage of [1, m]."""
n, m = map(int, input().split())
l = [0] * 101
for _ in range(n):
a, b = map(int, input().split())
for i in range(a + 1, b + 2):
l[i] += 1
for i in range(1, m + 1):
if not l[i]:
return Fals... | 688 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmpdggh2fmr.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Missing module docstring",
"check_name": "missing-module-docstring",
"category": "readability",
"message_identity": "missing-module-docstring::Missing module docstri... | [
{
"tool": "pylint",
"file": "/tmp/tmp85ivnwsr.py",
"line": 14,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 5,
"revised_total_messages": 2,
"old_messages_remaining": 1,
"new_messages_count": 1,
"mrr_at_pass": 0.6,
"new_msg_per_sample_at_pass": 1,
"line_churn_at_pass": 1,
"original_loc": 13,
"revised_loc": 14,
"added_lines": 7,
"deleted_lines": 6,
"category_mrr": {
"bug... | null |
935_F_cpp_0 | 935_F | train | cpp | #include <bits/stdc++.h>
using namespace std;
long long int inf = pow(10, 14), inf2 = pow(10, 12);
long long int n;
long long int arr[100005], diff[100005];
map<long long int, long long int> maxima, minima;
struct node {
long long int max1, min1;
};
node tr[7 * 100005];
node findSum(long long int qs, long long int qe... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpoo5r89bm.cpp",
"line": 3,
"column": 15,
"severity": "warning",
"message_text": "initialization of 'inf' with static storage duration may throw an exception that cannot be caught",
"check_name": "bugprone-throwing-static-initialization",
"categ... | 35 | 201 | true | Codeforces | Fafa and Array | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int q = opt<int>("q");
int max_ai = opt<int>("max_ai", 1000000000);
int max_xi = opt<int>("max_xi", 1000000000);
string array_type = opt<stri... | # Small n and q, constant array, only type 1 queries
./gen -n 3 -q 1 -max_ai 10 -max_xi 10 -array_type constant -query_type only_type1
# Small n and q, random array, only type 1 queries
./gen -n 3 -q 1 -max_ai 1000000000 -max_xi 1000000000 -array_type random -query_type only_type1
# Maximum n and q, constant array, o... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(3, 100000, "n");
inf.readEoln();
vector<int> a = inf.readInts(n, 1, 1000000000, "ai");
inf.readEoln();
int q = inf.readInt(1, 100000, "q");
... | #include <bits/stdc++.h>
using namespace std;
constexpr long long int inf = 100000000000000LL;
constexpr long long int inf2 = 1000000000000LL;
long long int n;
long long int arr[100005], diff[100005];
map<long long int, long long int> maxima, minima;
struct node {
long long int max1, min1;
};
node tr[7 * 100005];
nod... | ```cpp
#include <bits/stdc++.h>
using namespace std;
constexpr long long int inf = 100000000000000LL;
constexpr long long int inf2 = 1000000000000LL;
long long int n;
long long int arr[100005], diff[100005];
map<long long int, long long int> maxima, minima;
struct node {
long long int max1, min1;
};
node tr[7 * 10000... | 5,892 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpoo5r89bm.cpp",
"line": 3,
"column": 15,
"severity": "warning",
"message_text": "initialization of 'inf' with static storage duration may throw an exception that cannot be caught",
"check_name": "bugprone-throwing-static-initialization",
"categ... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp15jfvb25.cpp",
"line": 85,
"column": 26,
"severity": "warning",
"message_text": "2 adjacent parameters of 'findMaxima' of similar type ('long long') are easily swapped by mistake",
"check_name": "bugprone-easily-swappable-parameters",
"categor... | {
"original_total_messages": 35,
"revised_total_messages": 3,
"old_messages_remaining": 3,
"new_messages_count": 0,
"mrr_at_pass": 0.9142857143,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.6467661692,
"original_loc": 201,
"revised_loc": 237,
"added_lines": 83,
"deleted_lines": 47,
"... | null |
946_A_java_0 | 946_A | train | java | import java.util.*;
public class Main {
public static void main(String[] Args) {
Scanner in = new Scanner(System.in);
int n=in.nextInt();
int min = Integer.MAX_VALUE;
int sum=0;
for(int i=0;i<n;i++) {
int a=in.nextInt();
sum+=a;
if(min>a) {
min=a;
}
}
if(min>=0) {
System.out.println... | [
{
"tool": "pmd",
"file": "/tmp/tmpv8m5ea4_.java",
"line": 5,
"column": 35,
"severity": "error",
"message_text": "The method parameter name 'Args' doesn't match '[a-z][a-zA-Z0-9]*'",
"check_name": "FormalParameterNamingConventions",
"category": "readability",
"message_identity": "... | 1 | 23 | false | Codeforces | Partition | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
vector<int> a(n);
if(type == "random") {
for(int i = 0; i < n; ++i)
a[i] = rnd.nex... | ./gen -n 1 -type zero
./gen -n 1 -type positive
./gen -n 1 -type negative
./gen -n 1 -type random
./gen -n 1 -type mixed
./gen -n 2 -type alternating
./gen -n 2 -type mixed
./gen -n 2 -type positive
./gen -n 2 -type zero
./gen -n 2 -type negative
./gen -n 10 -type random
./gen -n 10 -type positive
./gen -n 10 -type n... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 100); // [1, 100]
inf.readEoln(); // Ensure EOLN after n
vector<int> a = inf.readInts(n, -100, 100); // Read n integers between -100 and 100 incl... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int min = Integer.MAX_VALUE;
int sum = 0;
for (int i = 0; i < n; i++) {
int a = in.nextInt();
sum += a;
if (min > a) {
min = a;
}
}
if (min >= 0) ... | ```java
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int min = Integer.MAX_VALUE;
int sum = 0;
for (int i = 0; i < n; i++) {
int a = in.nextInt();
sum += a;
if (min > a) {
min = a;
}
}
if (mi... | 605 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpv8m5ea4_.java",
"line": 5,
"column": 35,
"severity": "error",
"message_text": "The method parameter name 'Args' doesn't match '[a-z][a-zA-Z0-9]*'",
"check_name": "FormalParameterNamingConventions",
"category": "readability",
"message_identity": "... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
995_A_cpp_0 | 995_A | valid | cpp | #include <bits/stdc++.h>
typedef long long LL;
const double INF = 1e100;
const int oo = ~0u >> 2;
const double pi = acos(-1.0);
const double EPS = 1e-8;
const int MAXN = 100033;
int n, k;
int map[5][55];
int pos[55];
int pos2[55];
struct node {
int a, b, c;
};
std::vector<node> V;
std::queue<std::pair<int, int> > Q;
... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmptkmbkwcn.cpp",
"line": 16,
"column": 34,
"severity": "warning",
"message_text": "initialization of 'Q' with static storage duration may throw an exception that cannot be caught",
"check_name": "bugprone-throwing-static-initialization",
"catego... | 81 | 193 | true | Codeforces | Tesla | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int k = opt<int>("k");
string type = opt<string>("type", "random");
// Validate constraints
assert(1 <= n && n <= 50);
assert(1 <= k && ... | ./gen -n 1 -k 1 -type minimal
./gen -n 1 -k 2 -type impossible
./gen -n 2 -k 2 -type random
./gen -n 2 -k 4 -type random
./gen -n 3 -k 3 -type blocked
./gen -n 3 -k 6 -type blocked
./gen -n 3 -k 6 -type random
./gen -n 5 -k 5 -type pre-solved
./gen -n 5 -k 10 -type pre-solved
./gen -n 5 -k 10 -type random
./gen -n 1... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int n, k;
int grid[5][51]; // The parking lot grid
map<int, pair<int, int>> carPosition; // Current position of each car
map<int, pair<int, int>> carParkingSpot; // Designated parking spots for each car
int main(int argc, char* argv[]) {
register... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 50, "n");
inf.readSpace();
int k = inf.readInt(1, 2 * n, "k");
inf.readEoln();
vector<int> parking_spots(k + 1, 0); // Counts for cars in ... | #include <bits/stdc++.h>
typedef long long LL;
const double INF = 1e100;
const int oo = ~0u >> 2;
const double pi = acos(-1.0);
const double EPS = 1e-8;
const int MAXN = 100033;
int n, k;
int map[5][55];
int pos[55];
int pos2[55];
struct node {
int a, b, c;
};
std::vector<node> V;
std::queue<std::pair<int, int> > Q;
... | ```cpp
#include <bits/stdc++.h>
typedef long long LL;
const double INF = 1e100;
const int oo = ~0u >> 2;
const double pi = acos(-1.0);
const double EPS = 1e-8;
const int MAXN = 100033;
int n, k;
int map[5][55];
int pos[55];
int pos2[55];
struct node {
int a, b, c;
};
std::vector<node> V;
std::queue<std::pair<int, int... | 6,420 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmptkmbkwcn.cpp",
"line": 16,
"column": 34,
"severity": "warning",
"message_text": "initialization of 'Q' with static storage duration may throw an exception that cannot be caught",
"check_name": "bugprone-throwing-static-initialization",
"catego... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpknzawo26.cpp",
"line": 16,
"column": 34,
"severity": "warning",
"message_text": "initialization of 'Q' with static storage duration may throw an exception that cannot be caught",
"check_name": "bugprone-throwing-static-initialization",
"catego... | {
"original_total_messages": 81,
"revised_total_messages": 16,
"old_messages_remaining": 16,
"new_messages_count": 0,
"mrr_at_pass": 0.8024691358,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.8031088083,
"original_loc": 193,
"revised_loc": 206,
"added_lines": 84,
"deleted_lines": 71,
... | null |
p00057_java_0 | p00057 | train | java | import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
new Main();
}
public Main() {
while(sc.hasNext()){
new aoj0057().doIt();
}
}
class aoj0057 {
int a[] = new int [10001];
... | [
{
"tool": "pmd",
"file": "/tmp/tmprz31m5mh.java",
"line": 6,
"column": 10,
"severity": "warning",
"message_text": "Missing commented default access modifier on field 'sc'",
"check_name": "CommentDefaultAccessModifier",
"category": "readability",
"message_identity": "CommentDefaul... | 12 | 26 | false | AIZU | The Number of Area | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int d = opt<int>("d", 10);
ensure(1 <= d && d <= 50);
string type = opt<string>("type", "random");
vector<int> ns;
if(type == "small"){
for(int i = 0; i < ... | # Small n ranges
./gen -d 10 -type small
# Large n ranges
./gen -d 10 -type large
# Random n ranges
./gen -d 10 -type random
# Edge cases
./gen -d 3 -type edge
# Duplicate n = 1
./gen -d 10 -type duplicate -n 1
# Duplicate n = 10000
./gen -d 10 -type duplicate -n 10000
# Duplicate n = 5000
./gen -d 10 -type dupli... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int datasetCount = 0;
while (!inf.seekEof()) {
datasetCount++;
ensuref(datasetCount <= 50, "Number of datasets should not exceed 50, but it's %d", datasetC... | import java.util.Scanner;
public class Main {
private Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
new Main();
}
public Main() {
Aoj0057 solver = new Aoj0057();
while (sc.hasNext()) {
solver.doIt();
}
}
private ... | import java.util.Scanner;
public class Main {
private Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
new Main();
}
public Main() {
Aoj0057 solver = new Aoj0057();
while (sc.hasNext()) {
solver.doIt();
}
}
private ... | 976 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmprz31m5mh.java",
"line": 6,
"column": 10,
"severity": "warning",
"message_text": "Missing commented default access modifier on field 'sc'",
"check_name": "CommentDefaultAccessModifier",
"category": "readability",
"message_identity": "CommentDefaul... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p00127_py3_0 | p00127 | train | py3 | # Aizu Problem 00127: Pocket Pager Input
#
import sys, math, os, copy
# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
sys.stdin = open("sample-input.txt", "rt")
code = {1: "afkpuz", 2: "ablqv.", 3: "chmrw?", 4: "dinsx!", 5: "ejoty "}
def pocket_pager(string):
if len(string) % 2 == 1:
... | [
{
"tool": "pylint",
"file": "/tmp/tmplrtcwvho.py",
"line": 27,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | 8 | 21 | true | AIZU | Pocket Pager Input | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n"); // Number of messages
int maxlen = opt<int>("maxlen", 200); // Max length of messages in digits (up to 200)
string type = opt<string>("type", "mixed... | ./gen -n 1 -type valid
./gen -n 1 -type invalid
./gen -n 1 -type mixed
./gen -n 1 -type edge
./gen -n 5 -type valid
./gen -n 5 -type invalid
./gen -n 5 -type mixed
./gen -n 5 -type edge
./gen -n 10 -type valid
./gen -n 10 -type invalid
./gen -n 10 -type mixed
./gen -n 10 -type edge
./gen -n 20 -type valid
./gen -n 2... | #include "testlib.h"
#include <string>
using namespace std;
int main(int argc, char *argv[]) {
setName("compare files as sequence of lines");
registerTestlibCmd(argc, argv);
std::string strAnswer;
int n = 0;
while (!ans.eof()) {
std::string j = ans.readString();
i... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int messageCount = 0;
while (!inf.eof()) {
string s = inf.readLine();
if (s.empty() && inf.eof()) {
break;
}
messageCount++;
... | import sys
import os
CODE = {1: "afkpuz", 2: "ablqv.", 3: "chmrw?", 4: "dinsx!", 5: "ejoty "}
def pocket_pager(string):
"""Decode pocket pager input."""
if len(string) % 2 == 1:
return "NA"
res = ""
for k in range(len(string) // 2):
i = int(string[2 * k])
j = int(string[2 * k... | import sys
import os
CODE = {1: "afkpuz", 2: "ablqv.", 3: "chmrw?", 4: "dinsx!", 5: "ejoty "}
def pocket_pager(string):
"""Decode pocket pager input."""
if len(string) % 2 == 1:
return "NA"
res = ""
for k in range(len(string) // 2):
i = int(string[2 * k])
j = int(string[2 * k... | 915 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmplrtcwvho.py",
"line": 27,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | [
{
"tool": "pylint",
"file": "/tmp/tmp2b3o3yaf.py",
"line": 28,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 8,
"revised_total_messages": 2,
"old_messages_remaining": 2,
"new_messages_count": 0,
"mrr_at_pass": 0.75,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 1.0740740741,
"original_loc": 27,
"revised_loc": 28,
"added_lines": 15,
"deleted_lines": 14,
"category_mr... | null |
p00128_java_0 | p00128 | valid | java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main{
public static void main(String[] args)throws IOException{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(isr);
String string;
String abacus[] = ... | [
{
"tool": "pmd",
"file": "/tmp/tmpusaakj23.java",
"line": 10,
"column": 10,
"severity": "warning",
"message_text": "Array initialization can be written shorter",
"check_name": "UseShortArrayInitializer",
"category": "readability",
"message_identity": "UseShortArrayInitializer::Ar... | 6 | 38 | false | AIZU | Abacus | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int maxVal = opt<int>("maxVal", 99999);
int minVal = opt<int>("minVal", 0);
string type = opt<string>("type", "random");
vector<int> test_c... | ./gen -n 1 -type min
./gen -n 1 -type max
./gen -n 1 -type random
./gen -n 10 -type random
./gen -n 10 -type max
./gen -n 10 -type min
./gen -n 10 -type palindrome
./gen -n 10 -type alternating
./gen -n 50 -type random
./gen -n 50 -type max
./gen -n 50 -type min
./gen -n 50 -type palindrome
./gen -n 50 -type alternat... | #include "testlib.h"
#include <string>
using namespace std;
int main(int argc, char *argv[]) {
setName("compare files as sequence of lines");
registerTestlibCmd(argc, argv);
std::string strAnswer;
int n = 0;
while (!ans.eof()) {
std::string j = ans.readString();
i... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int testCaseCount = 0;
while (!inf.seekEof()) {
string s = inf.readLine();
testCaseCount++;
ensuref(testCaseCount <= 1024, "Number of test cases exce... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(isr);
String stri... | ```java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(isr);
Str... | 1,017 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpusaakj23.java",
"line": 10,
"column": 10,
"severity": "warning",
"message_text": "Array initialization can be written shorter",
"check_name": "UseShortArrayInitializer",
"category": "readability",
"message_identity": "UseShortArrayInitializer::Ar... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p00143_java_0 | p00143 | test | java | import java.util.*;
import java.io.*;
public class Main {
public double sign(Point a, Point b, Point c){
// writer.println((a.x-c.x)*(b.y-c.y) - (a.y-c.y)*(b.x-c.x));
return Math.signum((a.x-c.x)*(b.y-c.y) - (a.y-c.y)*(b.x-c.x));
}
public String judge(Triangle tr, Point p, Point q){
double x = Math.abs(sign(... | [
{
"tool": "pmd",
"file": "/tmp/tmppzrq_f3i.java",
"line": 4,
"column": 8,
"severity": "warning",
"message_text": "Each class should declare at least one constructor",
"check_name": "AtLeastOneConstructor",
"category": "readability",
"message_identity": "AtLeastOneConstructor::Eac... | 21 | 72 | false | AIZU | Altair and Vega | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-8;
bool is_point_on_line_segment(double x0, double y0,
double x1, double y1,
double x2, double y2){
double cross = (x2 - x1)*(y0 - y1) - (y2 - y1)*(x0 - x1);
if... | ./gen -n 5 -type opposite
./gen -n 5 -type both_inside
./gen -n 5 -type both_outside
./gen -n 5 -type random
./gen -n 5 -type degenerate
./gen -n 100 -type opposite
./gen -n 100 -type both_inside
./gen -n 100 -type both_outside
./gen -n 100 -type random
./gen -n 100 -type degenerate
./gen -n 1000 -type opposite
./gen... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare sequences of tokens");
registerTestlibCmd(argc, argv);
int n = 0;
string j, p;
while (!ans.seekEof() && !ouf.seekEof()) {
n++;
ans.readWordTo(j);
ouf.readWordTo(p... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
bool point_on_segment(int x1, int y1, int x2, int y2, int x, int y) {
// Check if (x,y) is colinear with (x1,y1)-(x2,y2)
int cross = (x - x1)*(y2 - y1) - (y - y1)*(x2 - x1);
if (cross != 0) return false; // Not colinear
// Now check if... | import java.util.*;
import java.io.*;
public class Main {
BufferedReader reader;
StringTokenizer tokenizer;
PrintWriter writer;
public Main() {
// default constructor
}
public double sign(Point a, Point b, Point c) {
return Math.signum((a.x - c.x) * (b.y - c.y) - (a.y - c.y) *... | ```java
import java.util.*;
import java.io.*;
public class Main {
BufferedReader reader;
StringTokenizer tokenizer;
PrintWriter writer;
public Main() {
// default constructor
}
public double sign(Point a, Point b, Point c) {
return Math.signum((a.x - c.x) * (b.y - c.y) - (a.y ... | 2,143 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmppzrq_f3i.java",
"line": 4,
"column": 8,
"severity": "warning",
"message_text": "Each class should declare at least one constructor",
"check_name": "AtLeastOneConstructor",
"category": "readability",
"message_identity": "AtLeastOneConstructor::Eac... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p00154_cpp_0 | p00154 | test | cpp | #include<iostream>
#include<cstring>
using namespace std;
long long dp[1001];
int main(){
int m;
int a[7],b[7];
while(cin>>m&&m){
memset(dp,0,sizeof(dp));
for(int i=0;i<m;i++){
cin>>a[i]>>b[i];
}
dp[0]=1;
for(int i=0;i<m;i++){
for(int j=1000;j>=0;j--){
for(int k=1;k<=b[i];k++){
if(1000<... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpzoq4ovyf.cpp",
"line": 22,
"column": 23,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-a... | 2 | 31 | true | AIZU | Sum of Cards | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
void generateRandomDataset(int m, int max_a, int max_b, int g, int max_n) {
printf("%d\n", m);
for (int i = 0; i < m; ++i) {
int a_i = rnd.next(1, max_a);
int b_i = rnd.next(1, max_b);
printf("%d %d\n", a_i, b_i);
}
... | # Random datasets with single dataset
./gen -datasets 1 -type random
./gen -datasets 1 -type random
./gen -datasets 1 -type random
# Random datasets with multiple datasets
./gen -datasets 5 -type random
./gen -datasets 10 -type random
# Maximum dataset sizes
./gen -datasets 100 -type max
# Minimum dataset sizes
./ge... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int dataset_count = 0;
while (true) {
int m = inf.readInt(0,7); // m ∈ [0,7]
inf.readEoln(); // Ensure that after m there is EOLN
if (m == 0)
... | #include<iostream>
#include<cstring>
using namespace std;
long long dp[1001];
int main(){
int m;
int a[7],b[7];
while(cin>>m&&m){
memset(dp,0,sizeof(dp));
for(int i=0;i<m;i++){
cin>>a[i]>>b[i];
}
dp[0]=1;
for(int i=0;i<m;i++){
for(int j=1000;... | ```cpp
#include<iostream>
#include<cstring>
using namespace std;
long long dp[1001];
int main(){
int m;
int a[7],b[7];
while(cin>>m&&m){
memset(dp,0,sizeof(dp));
for(int i=0;i<m;i++){
cin>>a[i]>>b[i];
}
dp[0]=1;
for(int i=0;i<m;i++){
for(int ... | 764 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpzoq4ovyf.cpp",
"line": 22,
"column": 23,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-a... | [] | {
"original_total_messages": 2,
"revised_total_messages": 0,
"old_messages_remaining": 0,
"new_messages_count": 0,
"mrr_at_pass": 1,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 1.5277777778,
"original_loc": 36,
"revised_loc": 35,
"added_lines": 27,
"deleted_lines": 28,
"category_mrr":... | null |
p00263_py3_0 | p00263 | train | py3 |
N = int(input())
for i in range(N):
S = str(input())
bit = bin(int(S, 16))[2:].zfill(32)
bit = bit[::-1]
# print(bit)
pos = (-1)**int(bit[31])
up = int(bit[7:31][::-1], 2)
# print(bit[7:31],len(bit[7:31]), int(bit[7:31], 2))
# print(bit[:7],len(bit[:7]))
# print(up)
low = 0
po... | [
{
"tool": "pylint",
"file": "/tmp/tmpiuqa22t8.py",
"line": 25,
"column": 0,
"severity": "warning",
"message_text": "Trailing newlines",
"check_name": "trailing-newlines",
"category": "readability",
"message_identity": "trailing-newlines::Trailing newlines"
},
{
"tool": "p... | 4 | 20 | true | AIZU | Kongo Type | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int Q = opt<int>("Q");
string type = opt<string>("type", "random");
// Output Q
printf("%d\n", Q);
for(int i = 0; i < Q; ++i) {
uint32_t bits = 0;
... | ./gen -Q 1 -type zero
./gen -Q 1 -type negativezero
./gen -Q 1 -type maxpositive
./gen -Q 1 -type maxnegative
./gen -Q 10 -type random
./gen -Q 10 -type smallpositive
./gen -Q 10 -type smallnegative
./gen -Q 100 -type random
./gen -Q 100 -type maxint
./gen -Q 100 -type maxdec
./gen -Q 100 -type minint
./gen -Q 100 -t... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare sequences of tokens");
registerTestlibCmd(argc, argv);
int n = 0;
string j, p;
while (!ans.seekEof() && !ouf.seekEof()) {
n++;
ans.readWordTo(j);
ouf.readWordTo(p... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int Q = inf.readInt(1, 10000, "Q");
inf.readEoln();
for (int i = 0; i < Q; i++) {
string s = inf.readLine("[0-9a-f]{8}", "si");
}
inf.readEof();
r... | import sys
def main() -> None:
n = int(sys.stdin.readline())
for _ in range(n):
s = sys.stdin.readline().strip()
bit = bin(int(s, 16))[2:].zfill(32)
bit = bit[::-1]
pos = (-1) ** int(bit[31])
up = int(bit[7:31][::-1], 2)
low = 0.0
power = 0.5
f... | import sys
def main() -> None:
n = int(sys.stdin.readline())
for _ in range(n):
s = sys.stdin.readline().strip()
bit = bin(int(s, 16))[2:].zfill(32)
bit = bit[::-1]
pos = (-1) ** int(bit[31])
up = int(bit[7:31][::-1], 2)
low = 0.0
power = 0.5
f... | 742 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmpiuqa22t8.py",
"line": 25,
"column": 0,
"severity": "warning",
"message_text": "Trailing newlines",
"check_name": "trailing-newlines",
"category": "readability",
"message_identity": "trailing-newlines::Trailing newlines"
},
{
"tool": "p... | [
{
"tool": "pylint",
"file": "/tmp/tmppf65n5jj.py",
"line": 24,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 4,
"revised_total_messages": 3,
"old_messages_remaining": 1,
"new_messages_count": 2,
"mrr_at_pass": 0.25,
"new_msg_per_sample_at_pass": 2,
"line_churn_at_pass": 1.56,
"original_loc": 25,
"revised_loc": 24,
"added_lines": 19,
"deleted_lines": 20,
"category_mrr": {
... | null |
p00393_java_0 | p00393 | train | java | import java.util.Scanner;
public class Main {
static final long mod = 1000000007;
static long dp[][] = new long[100010][2];
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
dp[0][0] = 1;
for (... | [
{
"tool": "pmd",
"file": "/tmp/tmpbk0as4gz.java",
"line": 4,
"column": 23,
"severity": "warning",
"message_text": "Missing commented default access modifier on field 'mod'",
"check_name": "CommentDefaultAccessModifier",
"category": "readability",
"message_identity": "CommentDefau... | 7 | 30 | false | AIZU | Beautiful Sequence | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int nInput = opt<int>("n", -1); // default -1 to indicate not specified
int mInput = opt<int>("m", -1);
string type = opt<string>("type", "random");
int N = -1, M = -1;... | ./gen -type min
./gen -type max
./gen -type m_equals_1
./gen -type m_equals_n
./gen -type n_small
./gen -type random
./gen -type random
./gen -type random
./gen -type large_n_small_m
./gen -type small_n_large_m
./gen -n 10 -type random
./gen -n 100 -type random
./gen -n 1000 -type random
./gen -n 10000 -type ra... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(1, 100000, "N");
inf.readSpace();
int M = inf.readInt(1, N, "M");
inf.readEoln();
inf.readEof();
return 0;
}
| import java.util.Scanner;
public class Main {
private static final long MOD = 1_000_000_007L;
private static final long[][] DP = new long[100_010][2];
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
... | ```java
import java.util.Scanner;
public class Main {
private static final long MOD = 1_000_000_007L;
private static final long[][] DP = new long[100_010][2];
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
... | 1,109 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpbk0as4gz.java",
"line": 4,
"column": 23,
"severity": "warning",
"message_text": "Missing commented default access modifier on field 'mod'",
"check_name": "CommentDefaultAccessModifier",
"category": "readability",
"message_identity": "CommentDefau... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p00485_py3_0 | p00485 | valid | py3 | # -*- coding: utf-8 -*-
"""
Shopping in JOI Kingdom
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0562
"""
import sys
from heapq import heappush, heappop
from itertools import combinations
def dijkstra(adj, s):
WHITE, GRAY, BLACK = 0, 1, 2
color = [WHITE] * len(adj)
d = [float('inf')] * len(ad... | [
{
"tool": "pylint",
"file": "/tmp/tmp82125i74.py",
"line": 36,
"column": 0,
"severity": "warning",
"message_text": "Line too long (109/100)",
"check_name": "line-too-long",
"category": "readability",
"message_identity": "line-too-long::Line too long (109/100)"
},
{
"tool"... | 10 | 47 | false | AIZU | Shopping in JOI Kingdom | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
void generate_chain(int n, int minL, int maxL, vector<tuple<int,int,int>>& edges) {
for(int i = 1; i < n; ++i) {
int u = i;
int v = i + 1;
int l = rnd.next(minL, maxL);
edges.push_back({u, v, l});
}
}
void gener... | ./gen -n 10 -m 9 -k 1 -type chain -minL 1 -maxL 1000
./gen -n 10 -m 9 -k 5 -type star -minL 1 -maxL 1000
./gen -n 10 -m 9 -k 2 -type tree -minL 10 -maxL 10
./gen -n 10 -m 15 -k 3 -type random -minL 1 -maxL 1000
./gen -n 100 -m 99 -k 1 -type chain -minL 1 -maxL 1
./gen -n 100 -m 99 -k 50 -type star -minL 1000 -maxL 100... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100000;
const int MAX_M = 200000;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(1, MAX_N, "N");
inf.readSpace();
int M = inf.readInt(0, MAX_M, "M");
inf.readSpace();
i... | """
Shopping in JOI Kingdom
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0562
"""
import sys
from heapq import heappush, heappop
from itertools import combinations
def dijkstra(adj, s):
"""Compute shortest distances from source s using Dijkstra's algorithm."""
white, gray, black = 0, 1, 2
colo... | ```python
"""
Shopping in JOI Kingdom
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0562
"""
import sys
from heapq import heappush, heappop
from itertools import combinations
def dijkstra(adj, s):
"""Compute shortest distances from source s using Dijkstra's algorithm."""
white, gray, black = 0, 1, ... | 1,514 | null | true | null | false | SyntaxError: invalid syntax (line 1) | [
{
"tool": "pylint",
"file": "/tmp/tmp82125i74.py",
"line": 36,
"column": 0,
"severity": "warning",
"message_text": "Line too long (109/100)",
"check_name": "line-too-long",
"category": "readability",
"message_identity": "line-too-long::Line too long (109/100)"
},
{
"tool"... | [] | null | null |
p00594_py3_0 | p00594 | valid | py3 | import sys
def count(i,data):
res = 0
for x in data:
if(x == i):
res += 1
return res
def print_color(size,data):
data = sorted(data)
for i in data:
if(count(i,data) > int(size / 2)):
print(i)
return
print("NO COLOR")
l = []
for i in sys.stdi... | [
{
"tool": "pylint",
"file": "/tmp/tmpkmnlt7bu.py",
"line": 6,
"column": 0,
"severity": "warning",
"message_text": "Unnecessary parens after 'if' keyword",
"check_name": "superfluous-parens",
"category": "readability",
"message_identity": "superfluous-parens::Unnecessary parens af... | 12 | 28 | false | AIZU | What Color Is The Universe? | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
static const long long MIN_VAL = -100000; // You may adjust these bounds if desired
static const long long MAX_VAL = 100000; // as long as they fit "less than 2^31"
int main(int argc, char* argv[]) {
// 1. Register the generator.
register... | # 1) A single small test case, fully random
./gen -tc 1 -n 5 -type random
# 2) Few small test cases, random
./gen -tc 3 -n 5 -type random
# 3) Few small test cases that guarantee a majority
./gen -tc 3 -n 5 -type majority
# 4) Few small test cases that guarantee NO majority
./gen -tc 3 -n 5 -type no-majority
# 5) L... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare sequences of tokens");
registerTestlibCmd(argc, argv);
int n = 0;
string j, p;
while (!ans.seekEof() && !ouf.seekEof()) {
n++;
ans.readWordTo(j);
ouf.readWordTo(p... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
const int MAX_N = 999999;
while (true) {
int n = inf.readInt(0, MAX_N, "|A|");
inf.readEoln();
if (n == 0) break;
ensuref(n >= 1, "|A| must ... | import sys
def count(value, data):
res = 0
for x in data:
if x == value:
res += 1
return res
def print_color(size, data):
data = sorted(data)
for value in data:
if count(value, data) > int(size / 2):
print(value)
return
print("NO COLOR")
... | ```python
import sys
def count(value, data):
res = 0
for x in data:
if x == value:
res += 1
return res
def print_color(size, data):
data = sorted(data)
for value in data:
if count(value, data) > int(size / 2):
print(value)
return
print("NO ... | 1,111 | null | true | null | false | SyntaxError: invalid syntax (line 1) | [
{
"tool": "pylint",
"file": "/tmp/tmpkmnlt7bu.py",
"line": 6,
"column": 0,
"severity": "warning",
"message_text": "Unnecessary parens after 'if' keyword",
"check_name": "superfluous-parens",
"category": "readability",
"message_identity": "superfluous-parens::Unnecessary parens af... | [] | null | null |
p00595_java_0 | p00595 | test | java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
StringTok... | [
{
"tool": "pmd",
"file": "/tmp/tmp1nw55vup.java",
"line": 10,
"column": 29,
"severity": "warning",
"message_text": "Avoid unused local variables such as 'st'.",
"check_name": "UnusedLocalVariable",
"category": "readability",
"message_identity": "UnusedLocalVariable::Avoid unused ... | 7 | 33 | false | AIZU | Greatest Common Divisor | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n", 10);
if (n > 49) n = 49; // Cap n at 49, as per problem constraints
string type = opt<string>("type", "random");
vector<pair<int,int>> pairs;
... | ./gen -n 20 -type random
./gen -n 20 -type equal
./gen -n 20 -type coprime
./gen -n 20 -type multiple
./gen -n 20 -type max
./gen -n 20 -type min
./gen -n 20 -type power2
./gen -n 20 -type divides
./gen -n 49 -type random
./gen -n 49 -type equal
./gen -n 49 -type coprime
./gen -n 49 -type multiple
./gen -n 49 -type ma... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int datasets = 0;
while (true) {
inf.skipBlanks();
if (inf.eof())
break;
if (datasets >= 49)
quitf(_fail, "Number of datasets must be less than... | import java.io.BufferedReader;
import java.io.InputStreamReader;
class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
br.readLine(); // skip first line
String line;
while ((line ... | ```java
import java.io.BufferedReader;
import java.io.InputStreamReader;
class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
br.readLine(); // skip first line
String line;
while... | 912 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmp1nw55vup.java",
"line": 10,
"column": 29,
"severity": "warning",
"message_text": "Avoid unused local variables such as 'st'.",
"check_name": "UnusedLocalVariable",
"category": "readability",
"message_identity": "UnusedLocalVariable::Avoid unused ... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p00613_cpp_0 | p00613 | train | cpp | #include <iostream>
using namespace std;
int main() {
int k;
while (cin >> k, k) {
int s = 0;
for (int i = 0, n = k * (k - 1) / 2; i < n; i++) {
int c;
cin >> c;
s += c;
}
cout << s / (k - 1) << endl;
}
} | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpo8wbstqa.cpp",
"line": 13,
"column": 32,
"severity": "warning",
"message_text": "do not use 'endl' with streams; use '\\n' instead",
"check_name": "performance-avoid-endl",
"category": "performance",
"message_identity": "performance-avoid-... | 1 | 14 | true | AIZU | A Piece of Cake | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n", 1);
int K = opt<int>("K", 2);
string type = opt<string>("type", "random");
if (n > 100) n = 100;
for (int dataSet = 0; dataSet < n; dataSet... | ./gen -n 1 -K 2 -type zeros
./gen -n 1 -K 2 -type maximum
./gen -n 1 -K 2 -type alternating
./gen -n 1 -K 2 -type random
./gen -n 1 -K 3 -type zeros
./gen -n 1 -K 3 -type maximum
./gen -n 1 -K 3 -type alternating
./gen -n 1 -K 3 -type increasing
./gen -n 1 -K 3 -type decreasing
./gen -n 1 -K 3 -type random
./gen -n 1... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int datasetCount = 0;
while (true) {
int K = inf.readInt(0, 100, "K");
inf.readEoln();
if (K == 0) break;
datasetCount++;
ensuref(data... | #include <iostream>
int main() {
int k;
while (std::cin >> k, k) {
int s = 0;
for (int i = 0, n = k * (k - 1) / 2; i < n; i++) {
int c;
std::cin >> c;
s += c;
}
std::cout << s / (k - 1) << '\n';
}
} | #include <iostream>
int main() {
int k;
while (std::cin >> k, k) {
int s = 0;
for (int i = 0, n = k * (k - 1) / 2; i < n; i++) {
int c;
std::cin >> c;
s += c;
}
std::cout << s / (k - 1) << '\n';
}
} | 537 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpo8wbstqa.cpp",
"line": 13,
"column": 32,
"severity": "warning",
"message_text": "do not use 'endl' with streams; use '\\n' instead",
"check_name": "performance-avoid-endl",
"category": "performance",
"message_identity": "performance-avoid-... | [] | {
"original_total_messages": 1,
"revised_total_messages": 0,
"old_messages_remaining": 0,
"new_messages_count": 0,
"mrr_at_pass": 1,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.4666666667,
"original_loc": 15,
"revised_loc": 14,
"added_lines": 3,
"deleted_lines": 4,
"category_mrr": {... | null |
p00714_java_0 | p00714 | train | java |
import static java.lang.System.*;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;
public class Main {
class Query impleme... | [
{
"tool": "pmd",
"file": "/tmp/tmpdd14ihs9.java",
"line": 14,
"column": 8,
"severity": "warning",
"message_text": "Each class should declare at least one constructor",
"check_name": "AtLeastOneConstructor",
"category": "readability",
"message_identity": "AtLeastOneConstructor::Ea... | 72 | 244 | false | AIZU | Water Tank | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int D = opt<int>("D", 1); // Number of datasets
string type = opt<string>("type", "random"); // Type of dataset
int N = opt<int>("N", 3); // Number of boards
int M = opt... | ./gen -D 1 -type minimal -N 1 -M 1 -L 1
./gen -D 1 -type maximal -N 9 -M 9 -L 9
./gen -D 2 -type random -N 3 -M 3 -L 3
./gen -D 3 -type random -N 5 -M 5 -L 5
./gen -D 1 -type random -N 9 -M 9 -L 9
./gen -D 1 -type random -N 1 -M 9 -L 9
./gen -D 1 -type random -N 9 -M 1 -L 9
./gen -D 1 -type random -N 9 -M 9 -L 1
./gen ... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]){
registerTestlibCmd(argc, argv);
int D = inf.readInt(); // Number of data sets
for (int dataSet = 1; dataSet <= D; ++dataSet) {
int N = inf.readInt(); // Number of boards
for (int i = 0; i... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int D = inf.readInt(1, 10, "D");
inf.readEoln();
for (int d = 0; d < D; ++d) {
int N = inf.readInt(1, 9, "N");
inf.readEoln();
vector<int> Bi(... | import static java.lang.System.*;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;
public class Main {
static Scanner sc ... | ```java
import static java.lang.System.*;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;
public class Main {
static Sca... | 6,440 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpdd14ihs9.java",
"line": 14,
"column": 8,
"severity": "warning",
"message_text": "Each class should declare at least one constructor",
"check_name": "AtLeastOneConstructor",
"category": "readability",
"message_identity": "AtLeastOneConstructor::Ea... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p01060_cpp_0 | p01060 | train | cpp | #include <bits/stdc++.h>
using namespace std;
const int D[3][2] = {{1, 0}, {0, 1}, {-1, 0}};
int main() {
int W, H, N, d, r = 0;
scanf("%d%d%d", &W, &H, &N);
vector<vector<int>> v = {{W, H, W}, {W - 1, H - 2, W - 1}},
p = {{0, 0}, {0, 1}}, c = {{0, 0}, {0, 0}};
for (; N--;) {
scanf("%d... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpx6p8zlwr.cpp",
"line": 6,
"column": 3,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-unchecke... | 5 | 17 | true | AIZU | Product Sale Lines | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
const int MIN_WH = 4;
const int MAX_WH = 100;
const int MAX_N = 100;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int W = opt<int>("W", 10); // Default W = 10
int H = opt<int>("H", 10); // Default H = 10
int N = opt<i... | ./gen -W 4 -H 4 -N 0 -type n0
./gen -W 4 -H 4 -N 10 -type all0
./gen -W 4 -H 4 -N 10 -type all1
./gen -W 4 -H 4 -N 10 -type alternating
./gen -W 4 -H 4 -N 10 -type random
./gen -W 4 -H 4 -N 10 -type pattern1
./gen -W 4 -H 4 -N 10 -type pattern2
./gen -W 4 -H 4 -N 10 -type pattern3
./gen -W 100 -H 100 -N 100 -type all0... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int W = inf.readInt(4, 100, "W");
inf.readSpace();
int H = inf.readInt(4, 100, "H");
inf.readEoln();
int N = inf.readInt(0, 100, "N");
inf.readEoln();
v... | #include <bits/stdc++.h>
using namespace std;
const int D[3][2] = {{1, 0}, {0, 1}, {-1, 0}};
int main() {
int W, H, N, d, r = 0;
if (scanf("%d%d%d", &W, &H, &N) != 3) return 1;
vector<vector<int>> v = {{W, H, W}, {W - 1, H - 2, W - 1}},
p = {{0, 0}, {0, 1}}, c = {{0, 0}, {0, 0}};
for (; N-... | ```cpp
#include <bits/stdc++.h>
using namespace std;
const int D[3][2] = {{1, 0}, {0, 1}, {-1, 0}};
int main() {
int W, H, N, d, r = 0;
if (scanf("%d%d%d", &W, &H, &N) != 3) return 1;
vector<vector<int>> v = {{W, H, W}, {W - 1, H - 2, W - 1}},
p = {{0, 0}, {0, 1}}, c = {{0, 0}, {0, 0}};
fo... | 1,070 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpx6p8zlwr.cpp",
"line": 6,
"column": 3,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-unchecke... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpfjndwyfb.cpp",
"line": 6,
"column": 7,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead",
"check_name": "bugprone-unchecke... | {
"original_total_messages": 5,
"revised_total_messages": 4,
"old_messages_remaining": 4,
"new_messages_count": 0,
"mrr_at_pass": 0.2,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.9411764706,
"original_loc": 17,
"revised_loc": 23,
"added_lines": 11,
"deleted_lines": 5,
"category_mrr"... | null |
p01127_java_0 | p01127 | test | java | import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
new Main();
}
public Main() {
new aoj2002().doIt();
}
class aoj2002{
char map[][] = new char[51][51];
Size size[] = new Size[128];
ArrayL... | [
{
"tool": "pmd",
"file": "/tmp/tmpqstssch3.java",
"line": 4,
"column": 13,
"severity": "warning",
"message_text": "Missing commented default access modifier on field 'sc'",
"check_name": "CommentDefaultAccessModifier",
"category": "readability",
"message_identity": "CommentDefaul... | 27 | 107 | false | AIZU | X-Ray Screening System | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int nt = opt<int>("nt", 1); // number of test datasets
int h = opt<int>("h", 1); // height
int w = opt<int>("w", 1); // width
string type = opt<st... | ./gen -nt 1 -h 1 -w 1 -type safe
./gen -nt 1 -h 1 -w 1 -type suspicious
./gen -nt 1 -h 3 -w 3 -type safe
./gen -nt 1 -h 3 -w 3 -type suspicious
./gen -nt 1 -h 10 -w 10 -type safe
./gen -nt 1 -h 10 -w 10 -type suspicious
./gen -nt 1 -h 50 -w 50 -type safe
./gen -nt 1 -h 50 -w 50 -type suspicious
./gen -nt 5 -h 10 -w 10 ... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare sequences of tokens");
registerTestlibCmd(argc, argv);
int n = 0;
string j, p;
while (!ans.seekEof() && !ouf.seekEof()) {
n++;
ans.readWordTo(j);
ouf.readWordTo(p... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(1, 100, "N");
inf.readEoln();
long long totalHW = 0;
for (int dataSetNo = 0; dataSetNo < N; dataSetNo++) {
int H = inf.readInt(1, 50, "... | import java.util.*;
public class Main {
private Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
new Main();
}
public Main() {
new Aoj2002().doIt();
}
private class Aoj2002 {
private char[][] map = new char[51][51];
private Size[] ... | ```java
import java.util.*;
public class Main {
private Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
new Main();
}
public Main() {
new Aoj2002().doIt();
}
private class Aoj2002 {
private char[][] map = new char[51][51];
private... | 2,822 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpqstssch3.java",
"line": 4,
"column": 13,
"severity": "warning",
"message_text": "Missing commented default access modifier on field 'sc'",
"check_name": "CommentDefaultAccessModifier",
"category": "readability",
"message_identity": "CommentDefaul... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p01153_cpp_0 | p01153 | train | cpp | #include <bits/stdc++.h>
using namespace std;
int b[110];
int dp[110][110];
int tmp[110][110];
int n;
inline int ABS(int a) { return max(a, -a); }
int solve(int l, int r) {
if (~dp[l][r]) return dp[l][r];
if (l == r) return dp[l][r] = 0;
for (int i = 0; i <= (r - l + n) % n; i++) {
tmp[l][i] = -99999999;
}
... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp9ifhauih.cpp",
"line": 9,
"column": 17,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-ar... | 8 | 42 | true | AIZU | Gather on the Clock | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n", 10);
string type = opt<string>("type", "random");
int cases = opt<int>("cases", 1);
// Ensure n is within the constraints
if(n < 2) n = 2;
... | ./gen -type small_random -n 2 -cases 1
./gen -type small_random -n 3 -cases 2
./gen -type small_random -n 5 -cases 3
./gen -type small_random -n 25 -cases 5
./gen -type small_random -n 50 -cases 5
./gen -type small_random -n 75 -cases 5
./gen -type small_random -n 100 -cases 10
./gen -type small_random -n 10 -cases 100... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int T = inf.readInt(1, 100000, "T");
inf.readEoln();
long long totalN = 0;
for (int test_case = 0; test_case < T; ++test_case) {
int n = inf.readI... | #include <bits/stdc++.h>
using namespace std;
int b[110];
int dp[110][110];
int tmp[110][110];
int n;
inline int ABS(int a) { return max(a, -a); }
int solve(int l, int r) {
if (~dp[l][r]) return dp[l][r];
if (l == r) {
return dp[l][r] = 0;
}
for (int i = 0; i <= (r - l + n) % n; i++) {
tmp[l][i] = -9999... | ```cpp
#include <bits/stdc++.h>
using namespace std;
int b[110];
int dp[110][110];
int tmp[110][110];
int n;
inline int ABS(int a) { return max(a, -a); }
int solve(int l, int r) {
if (~dp[l][r]) return dp[l][r];
if (l == r) {
return dp[l][r] = 0;
}
for (int i = 0; i <= (r - l + n) % n; i++) {
tmp[l][i] ... | 1,547 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmp9ifhauih.cpp",
"line": 9,
"column": 17,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-ar... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpqf_ft3wz.cpp",
"line": 9,
"column": 17,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-ar... | {
"original_total_messages": 8,
"revised_total_messages": 4,
"old_messages_remaining": 4,
"new_messages_count": 0,
"mrr_at_pass": 0.5,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.6428571429,
"original_loc": 42,
"revised_loc": 55,
"added_lines": 20,
"deleted_lines": 7,
"category_mrr"... | null |
p01306_py3_0 | p01306 | train | py3 | m = {"yotta":24, "zetta":21, "exa":18, "peta":15, "tera":12, "giga":9, "mega":6, "kilo":3, "hecto":2, "deca":1, "deci":-1, "centi":-2, "milli":-3, "micro":-6, "nano":-9, "pico":-12, "femto":-15, "ato":-18, "zepto":-21, "yocto":-24}
for _ in range(int(input())):
v, *b = input().split()
if len(b) == 2:
k,... | [
{
"tool": "pylint",
"file": "/tmp/tmp2cqxoa1r.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Line too long (231/100)",
"check_name": "line-too-long",
"category": "readability",
"message_identity": "line-too-long::Line too long (231/100)"
},
{
"tool":... | 8 | 24 | false | AIZU | Unit Converter | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int maxLen = opt<int>("maxLen", 1000);
int maxUnitLen = opt<int>("maxUnitLen", 50);
int prefixProb = opt<int>("prefixProb", 50); // default 50... | ./gen -n 10 -prefixProb 100
./gen -n 10 -prefixProb 0
./gen -n 2 -maxLen 1000 -specialCase maxDigits -numberType integer
./gen -n 2 -maxLen 1000 -specialCase maxDigits -numberType decimal
./gen -n 5 -specialCase leadingZero -numberType decimal -prefixProb 100
./gen -n 5 -specialCase trailingZero -numberType decimal -pr... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare sequences of tokens");
registerTestlibCmd(argc, argv);
int n = 0;
string j, p;
while (!ans.seekEof() && !ouf.seekEof()) {
n++;
ans.readWordTo(j);
ouf.readWordTo(p... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
const unordered_set<string> prefixes = {
"yotta", "zetta", "exa", "peta", "tera", "giga", "mega", "kilo", "hecto", "deca",
"deci", "centi", "milli", "micro", "na... | """Convert numbers with metric prefixes to scientific notation."""
METRIC_PREFIXES = {
"yotta": 24, "zetta": 21, "exa": 18, "peta": 15, "tera": 12,
"giga": 9, "mega": 6, "kilo": 3, "hecto": 2, "deca": 1,
"deci": -1, "centi": -2, "milli": -3, "micro": -6, "nano": -9,
"pico": -12, "femto": -15, "ato": -18... | ```python
"""Convert numbers with metric prefixes to scientific notation."""
METRIC_PREFIXES = {
"yotta": 24, "zetta": 21, "exa": 18, "peta": 15, "tera": 12,
"giga": 9, "mega": 6, "kilo": 3, "hecto": 2, "deca": 1,
"deci": -1, "centi": -2, "milli": -3, "micro": -6, "nano": -9,
"pico": -12, "femto": -15, ... | 1,262 | null | true | null | false | SyntaxError: invalid syntax (line 1) | [
{
"tool": "pylint",
"file": "/tmp/tmp2cqxoa1r.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Line too long (231/100)",
"check_name": "line-too-long",
"category": "readability",
"message_identity": "line-too-long::Line too long (231/100)"
},
{
"tool":... | [] | null | null |
p01531_java_0 | p01531 | train | java |
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String[] c = new String[]{"w", "", "k", "s", "t", "n", "h", "m", "y", "r"};
String s = sc.next();
for(int i=0;i<s.length()/2;i++){
char ss = s.charAt(i*2+1);
if(s.charAt(i*2) !... | [
{
"tool": "pmd",
"file": "/tmp/tmp2ose61t4.java",
"line": 7,
"column": 12,
"severity": "warning",
"message_text": "Array initialization can be written shorter",
"check_name": "UseShortArrayInitializer",
"category": "readability",
"message_identity": "UseShortArrayInitializer::Arr... | 7 | 27 | false | AIZU | Flick Input | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string mode = opt<string>("mode", "random");
// Ensure that n is even and within [2, 1000]
if (n < 2) n = 2;
if (n > 1000) n = 1000;
if ... | ./gen -n 2 -mode random
./gen -n 4 -mode random
./gen -n 6 -mode random
./gen -n 8 -mode random
./gen -n 10 -mode random
./gen -n 100 -mode random
./gen -n 200 -mode random
./gen -n 500 -mode random
./gen -n 1000 -mode random
./gen -n 2 -mode max_output
./gen -n 100 -mode max_output
./gen -n 200 -mode max_output
./gen... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare sequences of tokens");
registerTestlibCmd(argc, argv);
int n = 0;
string j, p;
while (!ans.seekEof() && !ouf.seekEof()) {
n++;
ans.readWordTo(j);
ouf.readWordTo(p... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
// Read the input string S
string s = inf.readLine("([0-9][TLURD]){1,500}", "S");
// Check that length of s is between 2 and 1000
ensuref(2 <= s.length() && s.lengt... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String[] c = {"w", "", "k", "s", "t", "n", "h", "m", "y", "r"};
String s = sc.next();
for (int i = 0; i < s.length() / 2; i++) {
char ss = s.charAt... | ```java
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String[] c = {"w", "", "k", "s", "t", "n", "h", "m", "y", "r"};
String s = sc.next();
for (int i = 0; i < s.length() / 2; i++) {
char ss = ... | 929 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmp2ose61t4.java",
"line": 7,
"column": 12,
"severity": "warning",
"message_text": "Array initialization can be written shorter",
"check_name": "UseShortArrayInitializer",
"category": "readability",
"message_identity": "UseShortArrayInitializer::Arr... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p01532_java_0 | p01532 | train | java | import java.util.*;
import java.math.*;
import java.awt.geom.*;
import java.io.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int T = sc.nextInt();
int H = sc.nextInt();
int L = sc.nextInt();
int[] t = new int[N];
int[]... | [
{
"tool": "pmd",
"file": "/tmp/tmpiagtrqxu.java",
"line": 8,
"column": 21,
"severity": "warning",
"message_text": "The method 'main(String[])' has a cognitive complexity of 18, current threshold is 15",
"check_name": "CognitiveComplexity",
"category": "modernize",
"message_identi... | 12 | 56 | false | AIZU | Problem B War II | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int N = opt<int>("N");
int T = opt<int>("T");
int H = opt<int>("H");
int L = opt<int>("L");
string type = opt<string>("type", "random");
if (L < T || L > 100) {... | # Random test cases with N = 10
./gen -N 10 -T 10 -H 10 -L 20 -type random
./gen -N 10 -T 0 -H 0 -L 10 -type random
# Random test case with N = 100
./gen -N 100 -T 50 -H 50 -L 80 -type random
# Test case where the first player has no coins
./gen -N 10 -T 10 -H 10 -L 20 -type zero_coin_player
# Maximum N (N = 100)
./... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
registerValidation(argc, argv);
int N = inf.readInt(1, 100, "N");
inf.readSpace();
int T = inf.readInt(0, 100, "T");
inf.readSpace();
int H = inf.readInt(0, 100, "H");
inf.readSpace();
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int t = sc.nextInt();
int h = sc.nextInt();
int l = sc.nextInt();
int[] tArr = new int[n];
int[] hArr = new int[n... | ```java
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int t = sc.nextInt();
int h = sc.nextInt();
int l = sc.nextInt();
int[] tArr = new int[n];
int[] hArr = n... | 1,370 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpiagtrqxu.java",
"line": 8,
"column": 21,
"severity": "warning",
"message_text": "The method 'main(String[])' has a cognitive complexity of 18, current threshold is 15",
"check_name": "CognitiveComplexity",
"category": "modernize",
"message_identi... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p01802_cpp_0 | p01802 | train | cpp | #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#define REP(i,n) for (int i=0;i<(n);i++)
#define ll long long
#define ull unsigned long long
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int d,e;
while(cin... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpf_z_fdzo.cpp",
"line": 5,
"column": 27,
"severity": "warning",
"message_text": "macro argument should be enclosed in parentheses",
"check_name": "bugprone-macro-parentheses",
"category": "bugprone",
"message_identity": "bugprone-macro-pare... | 5 | 23 | false | AIZU | Koto Municipal Subway | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
// Read parameters
int n = opt<int>("n", 100); // number of datasets
int minD = opt<int>("minD", 1);
int maxD = opt<int>("maxD", 100);
int minE = opt<int>("minE", 1... | ./gen -n 100 -type random
./gen -n 100 -minD 1 -maxD 1 -type random
./gen -n 100 -minD 100 -maxD 100 -type random
./gen -n 100 -minE 1 -maxE 1 -type random
./gen -n 100 -minE 100 -maxE 100 -type random
./gen -n 100 -type maxD
./gen -n 100 -type minD
./gen -n 100 -type maxE
./gen -n 100 -type minE
./gen -n 10 -type spec... | #include "testlib.h"
using namespace std;
const double EPS = 1E-6;
int main(int argc, char *argv[]) {
setName("compare two sequences of doubles, max absolute or relative error = %.7f", EPS);
registerTestlibCmd(argc, argv);
int n = 0;
double j = 0, p = 0;
while (!ans.seekEof()) {
... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int datasetCount = 0;
while (true) {
int D = inf.readInt(0, 100, "D");
inf.readSpace();
int E = inf.readInt(0, 100, "E");
inf.readEoln();
... | #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#define REP(i,n) for ((i)=0;(i)<(n);(i)++)
#define ll long long
#define ull unsigned long long
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
using namespace std;
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int d,e;
w... | ```cpp
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#define REP(i,n) for ((i)=0;(i)<(n);(i)++)
#define ll long long
#define ull unsigned long long
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
using namespace std;
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int ... | 789 | null | true | null | false | /tmp/tmpgugtoeu5.cpp: In function ‘int main()’:
/tmp/tmpgugtoeu5.cpp:19:21: error: ‘i’ was not declared in this scope
19 | REP(i,d/2 + 1){
| ^
/tmp/tmpgugtoeu5.cpp:5:24: note: in definition of macro ‘REP’
5 | #define REP(i,n) for ((i)=0;(i)<(n);(i)++)
| ... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpf_z_fdzo.cpp",
"line": 5,
"column": 27,
"severity": "warning",
"message_text": "macro argument should be enclosed in parentheses",
"check_name": "bugprone-macro-parentheses",
"category": "bugprone",
"message_identity": "bugprone-macro-pare... | [] | null | null |
p02209_cpp_0 | p02209 | train | cpp | #include<iostream>
using namespace std;
bool ng[1<<20] = {};
int popcnt[1<<20] = {};
int main(){
int n, k;
cin >> n >> k;
int a[n], ret = n;
for(int i = 0; i < n; i++) cin >> a[i];
for(int s = 1; s < 1<<n; s++){
int sum = 0;
for(int i = 0; i < n; i++) if((s>>i)&1) sum += a[i],... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpakryvawc.cpp",
"line": 10,
"column": 11,
"severity": "warning",
"message_text": "variable length arrays in C++ are a Clang extension",
"check_name": "clang-diagnostic-vla-cxx-extension",
"category": "other",
"message_identity": "clang-diag... | 8 | 19 | true | AIZU | Are Cards Snacks? | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int k = opt<int>("k");
int maxA = opt<int>("maxA", 1000000); // Default maxA is 1e6
string type = opt<string>("type", "random");
int sameA = ... | ./gen -n 1 -k 1 -type random
./gen -n 1 -k 1 -type allzeros
./gen -n 1 -k 1 -type allsame -sameA 0
./gen -n 1 -k 1 -type maxAi
./gen -n 1 -k 1 -type minAi
./gen -n 20 -k 1000000000 -type random
./gen -n 20 -k 1000000000 -type allzeros
./gen -n 20 -k 1000000000 -type allsame -sameA 1000000
./gen -n 20 -k 1 -type minAi
... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(1, 20, "N");
inf.readSpace();
long long K = inf.readLong(1LL, 1000000000LL, "K");
inf.readEoln();
vector<int> A = inf.readInts(N, 0, 100000... | #include<iostream>
#include<vector>
using namespace std;
bool ng[1<<20] = {};
int popcnt[1<<20] = {};
int main(){
int n, k;
cin >> n >> k;
vector<int> a(n);
int ret = n;
for(int i = 0; i < n; i++) {
cin >> a[i];
}
for(int s = 1; s < 1<<n; s++){
int sum = 0;
for(int ... | ```cpp
#include<iostream>
#include<vector>
using namespace std;
bool ng[1<<20] = {};
int popcnt[1<<20] = {};
int main(){
int n, k;
cin >> n >> k;
vector<int> a(n);
int ret = n;
for(int i = 0; i < n; i++) {
cin >> a[i];
}
for(int s = 1; s < 1<<n; s++){
int sum = 0;
f... | 953 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpakryvawc.cpp",
"line": 10,
"column": 11,
"severity": "warning",
"message_text": "variable length arrays in C++ are a Clang extension",
"check_name": "clang-diagnostic-vla-cxx-extension",
"category": "other",
"message_identity": "clang-diag... | [] | {
"original_total_messages": 8,
"revised_total_messages": 0,
"old_messages_remaining": 0,
"new_messages_count": 0,
"mrr_at_pass": 1,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 1.380952381,
"original_loc": 21,
"revised_loc": 36,
"added_lines": 22,
"deleted_lines": 7,
"category_mrr": {... | null |
p02351_java_0 | p02351 | train | java | import java.io.*;
import java.util.Arrays;
import java.util.StringJoiner;
import java.util.StringTokenizer;
import java.util.function.Function;
import java.util.function.LongBinaryOperator;
public class Main {
public static void main(String[] args) {
FastScanner sc = new FastScanner(System.in);
in... | [
{
"tool": "pmd",
"file": "/tmp/tmp7nvro3df.java",
"line": 12,
"column": 13,
"severity": "error",
"message_text": "The local variable name 'N' doesn't match '[a-z][a-zA-Z0-9]*'",
"check_name": "LocalVariableNamingConventions",
"category": "readability",
"message_identity": "LocalV... | 78 | 214 | false | AIZU | RSQ and RAQ | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int q = opt<int>("q");
string type = opt<string>("type", "random");
printf("%d %d\n", n, q);
vector<string> queries;
if (type == "rando... | ./gen -n 5 -q 5 -type random
./gen -n 5 -q 5 -type max
./gen -n 5 -q 5 -type single_point
./gen -n 5 -q 5 -type full_range_queries
./gen -n 5 -q 5 -type no_add
./gen -n 5 -q 5 -type edge_values
./gen -n 5 -q 5 -type large_ranges
./gen -n 5 -q 5 -type small_ranges
./gen -n 10 -q 20 -type random
./gen -n 50 -q 50 -type ... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 100000, "n");
inf.readSpace();
int q = inf.readInt(1, 100000, "q");
inf.readEoln();
for (int i = 0; i < q; ++i) {
int qt = inf.rea... | import java.io.*;
import java.util.Arrays;
import java.util.StringJoiner;
import java.util.StringTokenizer;
import java.util.function.Function;
import java.util.function.LongBinaryOperator;
public class Main {
public static void main(String[] args) {
FastScanner sc = new FastScanner(System.in);
in... | ```java
import java.io.*;
import java.util.Arrays;
import java.util.StringJoiner;
import java.util.StringTokenizer;
import java.util.function.Function;
import java.util.function.LongBinaryOperator;
public class Main {
public static void main(String[] args) {
FastScanner sc = new FastScanner(System.in);
... | 6,409 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmp7nvro3df.java",
"line": 12,
"column": 13,
"severity": "error",
"message_text": "The local variable name 'N' doesn't match '[a-z][a-zA-Z0-9]*'",
"check_name": "LocalVariableNamingConventions",
"category": "readability",
"message_identity": "LocalV... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p02446_java_0 | p02446 | valid | java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
mylist ls=new mylist();
int n=Integer.parseInt(in.next());
for(int i=0;i<n;i++)ls.insert(Integer.parseInt(in.next()));
ls.unique();
ls.printls();
}
}
class node{
int v;
node prev,nex... | [
{
"tool": "pmd",
"file": "/tmp/tmpt3o3h5yh.java",
"line": 8,
"column": 3,
"severity": "warning",
"message_text": "This statement should have braces",
"check_name": "ControlStatementBraces",
"category": "readability",
"message_identity": "ControlStatementBraces::This statement sho... | 35 | 60 | false | AIZU | Unique | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
vector<int> a(n);
if (type == "random") {
// Generate random numbers in the range [-10000... | # n = 1
./gen -n 1 -type all_same
./gen -n 1 -type all_different
./gen -n 1 -type two_values
./gen -n 1 -type max_values
./gen -n 1 -type small_random
# n = 10
./gen -n 10 -type all_same
./gen -n 10 -type all_different
./gen -n 10 -type two_values
./gen -n 10 -type max_values
./gen -n 10 -type small_random
# n = 1000... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 100000, "n");
inf.readEoln();
vector<int> a = inf.readInts(n, -1000000000, 1000000000);
inf.readEoln();
for (int i = 0; i < n - 1; ++i) ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
MyList ls = new MyList();
int n = Integer.parseInt(in.next());
for (int i = 0; i < n; i++) {
ls.insert(Integer.parseInt(in.next()));
}
... | ```java
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
MyList ls = new MyList();
int n = Integer.parseInt(in.next());
for (int i = 0; i < n; i++) {
ls.insert(Integer.parseInt(in.next()));
... | 2,083 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpt3o3h5yh.java",
"line": 8,
"column": 3,
"severity": "warning",
"message_text": "This statement should have braces",
"check_name": "ControlStatementBraces",
"category": "readability",
"message_identity": "ControlStatementBraces::This statement sho... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p02553_py3_0 | p02553 | valid | py3 | a,b,c,d=map(int,input().split())
p=max(a*c,b*d,a*d,b*c)
print(p)
| [
{
"tool": "pylint",
"file": "/tmp/tmpdvoetus8.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Missing module docstring",
"check_name": "missing-module-docstring",
"category": "readability",
"message_identity": "missing-module-docstring::Missing module docstri... | 1 | 3 | true | AtCoder | AtCoder Beginner Contest 178 - Product Max | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
string type = opt<string>("type", "random");
const long long MIN_VAL = -1000000000LL;
const long long MAX_VAL = 1000000000LL;
long long a, b, c, d;
if (type == "... | ./gen -type random_small
./gen -type random_small
./gen -type random_small
./gen -type random_large
./gen -type random_large
./gen -type random_large
./gen -type max_product
./gen -type min_product
./gen -type zero_ranges
./gen -type zero_ranges
./gen -type single_value
./gen -type single_value
./gen -type negative_val... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
long long a = inf.readLong(-1000000000LL, 1000000000LL, "a");
inf.readSpace();
long long b = inf.readLong(-1000000000LL, 1000000000LL, "b");
inf.readSpace();
... | """Module to compute maximum product from four integers."""
a, b, c, d = map(int, input().split())
p = max(a * c, b * d, a * d, b * c)
print(p) | """Module to compute maximum product from four integers."""
a, b, c, d = map(int, input().split())
p = max(a * c, b * d, a * d, b * c)
print(p) | 409 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmpdvoetus8.py",
"line": 1,
"column": 0,
"severity": "warning",
"message_text": "Missing module docstring",
"check_name": "missing-module-docstring",
"category": "readability",
"message_identity": "missing-module-docstring::Missing module docstri... | [
{
"tool": "pylint",
"file": "/tmp/tmphlj0_1x2.py",
"line": 5,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
}
] | {
"original_total_messages": 1,
"revised_total_messages": 1,
"old_messages_remaining": 0,
"new_messages_count": 1,
"mrr_at_pass": 0,
"new_msg_per_sample_at_pass": 1,
"line_churn_at_pass": 2.6666666667,
"original_loc": 3,
"revised_loc": 5,
"added_lines": 5,
"deleted_lines": 3,
"category_mrr": {
... | null |
p02573_java_0 | p02573 | train | java | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
// Union Find Tree
UnionFindTree uft = new UnionFindTree(n);
for (int i = 0; i < m; ++i) {
... | [
{
"tool": "pmd",
"file": "/tmp/tmp8a1tirdc.java",
"line": 39,
"column": 9,
"severity": "warning",
"message_text": "Missing commented default access modifier on field 'size'",
"check_name": "CommentDefaultAccessModifier",
"category": "readability",
"message_identity": "CommentDefa... | 6 | 69 | false | AtCoder | AtCoder Beginner Contest 177 - Friends | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int N = opt<int>("N");
int M = opt<int>("M", -1); // If M is not provided, we'll set it based on the type
string type = opt<string>("type", "random");
int K = opt<int>(... | ./gen -N 2 -M 0 -type isolated
./gen -N 2 -type chain
./gen -N 2 -type star
./gen -N 5 -type chain
./gen -N 5 -type star
./gen -N 10 -M 15 -type random
./gen -N 10 -type clique
./gen -N 100 -M 200 -type random
./gen -N 100 -type chain
./gen -N 100 -type star
./gen -N 100 -K 10 -type components
./gen -N 500 -type ch... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(2, 2 * 100000, "N");
inf.readSpace();
int M = inf.readInt(0, 2 * 100000, "M");
inf.readEoln();
for (int i = 0; i < M; i++) {
int A... | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
// Union Find Tree
UnionFindTree uft = new UnionFindTree(n);
for (int i = 0; i < m; ++i) {
... | ```java
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
// Union Find Tree
UnionFindTree uft = new UnionFindTree(n);
for (int i = 0; i < m; ++i... | 1,696 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmp8a1tirdc.java",
"line": 39,
"column": 9,
"severity": "warning",
"message_text": "Missing commented default access modifier on field 'size'",
"check_name": "CommentDefaultAccessModifier",
"category": "readability",
"message_identity": "CommentDefa... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p02597_java_0 | p02597 | train | java | import java.util.*;
public class Main{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
String s=sc.next();
char a[]=s.toCharArray();
int i=0;
int j=n-1;
int count=0;
int flag=0;
int flag2=0;
int flag3=0;
while(i<=j)
{
while(a[i]=='R'&&i<j)... | [
{
"tool": "pmd",
"file": "/tmp/tmpfm3i_4pn.java",
"line": 3,
"column": 21,
"severity": "warning",
"message_text": "The method 'main(String[])' has a cognitive complexity of 15, current threshold is 15",
"check_name": "CognitiveComplexity",
"category": "modernize",
"message_identi... | 5 | 49 | false | AtCoder | AtCoder Beginner Contest 174 - Alter Altar | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
string type = opt<string>("type", "random");
string s;
if (type == "all_R") {
s = string(n, 'R');
} else if (type == "all_W") {
... | ./gen -n 2 -type all_R
./gen -n 2 -type all_W
./gen -n 2 -type alternating_RW
./gen -n 2 -type alternating_WR
./gen -n 10 -type all_R
./gen -n 10 -type all_W
./gen -n 10 -type alternating_RW
./gen -n 10 -type alternating_WR
./gen -n 10 -type max_WR
./gen -n 10 -type max_RW
./gen -n 10 -type random
./gen -n 100 -type ... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(2, 200000, "N");
inf.readEoln();
string s = inf.readLine();
ensuref(int(s.length()) == N, "The length of the string must be N=%d, but was %d", N... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String s = sc.next();
char[] a = s.toCharArray();
int i = 0;
int j = n - 1;
int count = 0;
while... | ```java
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String s = sc.next();
char[] a = s.toCharArray();
int i = 0;
int j = n - 1;
int count = 0;
... | 901 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpfm3i_4pn.java",
"line": 3,
"column": 21,
"severity": "warning",
"message_text": "The method 'main(String[])' has a cognitive complexity of 15, current threshold is 15",
"check_name": "CognitiveComplexity",
"category": "modernize",
"message_identi... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p02636_java_0 | p02636 | train | java | import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.System.exit;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Main {
static final int MOD =... | [
{
"tool": "pmd",
"file": "/tmp/tmpcxx3wkba.java",
"line": 13,
"column": 19,
"severity": "warning",
"message_text": "Missing commented default access modifier on field 'MOD'",
"check_name": "CommentDefaultAccessModifier",
"category": "readability",
"message_identity": "CommentDefa... | 25 | 94 | false | AtCoder | AtCoder Grand Contest 046 - Secret Passage | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
// Read parameters.
int n = opt<int>("n");
string type = opt<string>("type", "random");
if (n < 1 || n > 300) {
cerr << "Error: n must be between 1 and 300 inc... | ./gen -n 1 -type all_zero
./gen -n 1 -type all_one
./gen -n 1 -type random
./gen -n 2 -type one_zero_one
./gen -n 2 -type alternate
./gen -n 3 -type random
./gen -n 10 -type all_zero
./gen -n 10 -type all_one
./gen -n 10 -type alternate
./gen -n 10 -type half_half
./gen -n 10 -type random
./gen -n 50 -type random
./gen... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
string S = inf.readLine("^[01]{1,300}$");
inf.readEof();
return 0;
}
| import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.System.exit;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Main {
private static fina... | ```java
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.System.exit;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Main {
private sta... | 2,898 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpcxx3wkba.java",
"line": 13,
"column": 19,
"severity": "warning",
"message_text": "Missing commented default access modifier on field 'MOD'",
"check_name": "CommentDefaultAccessModifier",
"category": "readability",
"message_identity": "CommentDefa... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p02701_java_0 | p02701 | test | java | import java.util.Scanner;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
public class Main {
public static void main(String[]args){
Scanner in = new Scanner(Sys... | [
{
"tool": "pmd",
"file": "/tmp/tmpmf7lc9y1.java",
"line": 15,
"column": 8,
"severity": "error",
"message_text": "The local variable name 'N' doesn't match '[a-z][a-zA-Z0-9]*'",
"check_name": "LocalVariableNamingConventions",
"category": "readability",
"message_identity": "LocalVa... | 6 | 24 | false | AtCoder | AtCoder Beginner Contest 164 - gacha | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
string generateRandomString(int len) {
string s(len, ' ');
for(int i = 0; i < len; ++i) {
s[i] = 'a' + rnd.next(26); // Random letter 'a'-'z'
}
return s;
}
// Convert integer to base-26 string of length len
string intToString(i... | # Test cases with minimum N
./gen -n 1 -type all_same
./gen -n 1 -type random
# Small N
./gen -n 10 -type all_same
./gen -n 10 -type all_different
./gen -n 10 -type random
./gen -n 10 -type small_changes
./gen -n 10 -type max_length
./gen -n 10 -type min_length
./gen -n 10 -type alternating
./gen -n 10 -type repeated_... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(1, 200000);
inf.readEoln();
for (int i = 0; i < N; ++i) {
string s = inf.readLine("[a-z]{1,10}", "S_i");
}
inf.readEof();
return 0... | import java.util.Scanner;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
public class Main {
public static void main(String[] args) {
Scanner in = new ... | ```java
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
public class Main {
public static void main(String[] args) {
Scanner i... | 834 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpmf7lc9y1.java",
"line": 15,
"column": 8,
"severity": "error",
"message_text": "The local variable name 'N' doesn't match '[a-z][a-zA-Z0-9]*'",
"check_name": "LocalVariableNamingConventions",
"category": "readability",
"message_identity": "LocalVa... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p02768_cpp_0 | p02768 | train | cpp | #include <bits/stdc++.h>
using namespace std;
long long linp() {
long long x;
scanf("%lld", &x);
return x;
}
long long mod(long long i) { return i % 1000000007; }
void swap(long long& a, long long& b) {
long long t;
t = a;
a = b;
b = t;
return;
}
long long modinv(long long a, long long m) {
long long ... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpnbqntnec.cpp",
"line": 5,
"column": 3,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtoll' instead",
"check_name": "bugprone-uncheck... | 32 | 334 | true | AtCoder | AtCoder Beginner Contest 156 - Bouquet | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char * argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n");
int a = opt<int>("a", -1);
int b = opt<int>("b", -1);
string type = opt<string>("type", "random");
int min_ab = 1;
int max_ab = min(n, ... | ./gen -n 2 -a 1 -b 2
./gen -n 2 -type min_ab
./gen -n 5 -type random_ab
./gen -n 10 -type adjacent_ab
./gen -n 100 -type a_equals_one
./gen -n 100 -type b_equals_max_ab
./gen -n 1000 -type max_ab
./gen -n 1000 -type random_ab
./gen -n 10000 -type adjacent_ab
./gen -n 100000 -type random_ab
./gen -n 1000000 -type a_equa... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(2, 1000000000, "n");
inf.readSpace();
int M = min(n, 200000);
int a = inf.readInt(1, M - 1, "a");
inf.readSpace();
int b = inf.readInt(a +... | #include <bits/stdc++.h>
using namespace std;
long long linp() {
long long x;
if (scanf("%lld", &x) != 1) {
return 0;
}
return x;
}
long long mod(long long i) { return i % 1000000007; }
void swap(long long& a, long long& b) noexcept {
long long t;
t = a;
a = b;
b = t;
}
long long modinv(long long a,... | ```cpp
#include <bits/stdc++.h>
using namespace std;
long long linp() {
long long x;
if (scanf("%lld", &x) != 1) {
return 0;
}
return x;
}
long long mod(long long i) { return i % 1000000007; }
void swap(long long& a, long long& b) noexcept {
long long t;
t = a;
a = b;
b = t;
}
long long modinv(long ... | 6,564 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpnbqntnec.cpp",
"line": 5,
"column": 3,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtoll' instead",
"check_name": "bugprone-uncheck... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpor4eyo19.cpp",
"line": 5,
"column": 7,
"severity": "warning",
"message_text": "'scanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtoll' instead",
"check_name": "bugprone-uncheck... | {
"original_total_messages": 32,
"revised_total_messages": 12,
"old_messages_remaining": 11,
"new_messages_count": 1,
"mrr_at_pass": 0.625,
"new_msg_per_sample_at_pass": 1,
"line_churn_at_pass": 0.1946107784,
"original_loc": 334,
"revised_loc": 327,
"added_lines": 29,
"deleted_lines": 36,
"categ... | null |
p02860_java_0 | p02860 | valid | java | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N =sc.nextInt();
String str =sc.next();
String aaa="";
String bbb="";
if(str.length()%2==0&&str.length()==N) {
for(int i=0;i<(N/2);i++){
aaa = aaa+str.charAt(i);
bbb = bbb... | [
{
"tool": "pmd",
"file": "/tmp/tmp3izimxym.java",
"line": 5,
"column": 7,
"severity": "error",
"message_text": "The local variable name 'N' doesn't match '[a-z][a-zA-Z0-9]*'",
"check_name": "LocalVariableNamingConventions",
"category": "readability",
"message_identity": "LocalVar... | 3 | 20 | false | AtCoder | AtCoder Beginner Contest 145 - Echo | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
bool isDoubleString(const string& S) {
int n = S.size();
if (n % 2 != 0) {
return false;
}
int half = n / 2;
return S.substr(0, half) == S.substr(half, half);
}
int main(int argc, char* argv[]) {
registerGen(argc, argv,... | # Edge cases
./gen -n 1 -type edge
./gen -n 1 -type no_random
./gen -n 2 -type edge
./gen -n 2 -type no_random
./gen -n 2 -type no_special
# 'Yes' cases with even n
./gen -n 2 -type yes
./gen -n 4 -type yes
./gen -n 6 -type yes
./gen -n 8 -type yes
./gen -n 10 -type yes
./gen -n 20 -type yes
./gen -n 50 -type yes
./ge... | #include "testlib.h"
#include <string>
using namespace std;
const string YES = "YES";
const string NO = "NO";
int main(int argc, char *argv[]) {
setName("%s", ("multiple " + YES + "/" + NO + " (case insensitive)").c_str());
registerTestlibCmd(argc, argv);
int index = 0, yesCount = 0, noCount... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(1, 100, "N");
inf.readEoln();
string pattern = "[a-z]{" + to_string(N) + "}";
string S = inf.readLine(pattern, "S");
inf.readEof();
return... | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String str = sc.next();
StringBuilder aaa = new StringBuilder();
StringBuilder bbb = new StringBuilder();
if(str.length() % 2 == 0 && str.length() == n) {
for(... | ```java
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String str = sc.next();
StringBuilder aaa = new StringBuilder();
StringBuilder bbb = new StringBuilder();
if(str.length() % 2 == 0 && str.length() == n) {... | 712 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmp3izimxym.java",
"line": 5,
"column": 7,
"severity": "error",
"message_text": "The local variable name 'N' doesn't match '[a-z][a-zA-Z0-9]*'",
"check_name": "LocalVariableNamingConventions",
"category": "readability",
"message_identity": "LocalVar... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p02883_java_0 | p02883 | valid | java | import java.util.*;
import java.io.*;
public class Main {
static long[] food;
static long[] team;
static long k;
public static boolean poss(long t){
long count = 0;
for(int i = 0; i<food.length; i++){
if(food[i]*team[i] > t){
count += team[i] - t/food[i];
... | [
{
"tool": "pmd",
"file": "/tmp/tmpt1_mgznp.java",
"line": 5,
"column": 19,
"severity": "warning",
"message_text": "Do not use non-final non-private static fields",
"check_name": "MutableStaticState",
"category": "modernize",
"message_identity": "MutableStaticState::Do not use non... | 19 | 111 | false | AtCoder | AtCoder Beginner Contest 144 - Gluttony | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
// Read parameters.
// Please pass n and K explicitly (e.g., -n 10 -k 100).
// type can be one of: random, sortedAsc, sortedDesc, allOne, allMax
// Default values are p... | # Below are example commands to produce test cases.
# Each command prints exactly one test case to standard output.
# You can redirect or combine these outputs in any way you wish.
# 1) Very small N, K=0, allOne A and F.
./gen -n 1 -k 0 -type allOne
# 2) Small N=2, K=1, allMax A and F.
./gen -n 2 -k 1 -type allMax
#... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(1, 200000, "N");
inf.readSpace();
long long K = inf.readLong(0, 1000000000000000000LL, "K");
inf.readEoln();
vector<int> A = inf.readInts(N,... | import java.util.*;
import java.io.*;
public class Main {
private static long[] food;
private static long[] team;
private static long k;
public static boolean poss(long t) {
long count = 0;
for (int i = 0; i < food.length; i++) {
if (food[i] * team[i] > t) {
... | ```java
import java.util.*;
import java.io.*;
public class Main {
private static long[] food;
private static long[] team;
private static long k;
public static boolean poss(long t) {
long count = 0;
for (int i = 0; i < food.length; i++) {
if (food[i] * team[i] > t) {
... | 1,962 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpt1_mgznp.java",
"line": 5,
"column": 19,
"severity": "warning",
"message_text": "Do not use non-final non-private static fields",
"check_name": "MutableStaticState",
"category": "modernize",
"message_identity": "MutableStaticState::Do not use non... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p02966_cpp_0 | p02966 | train | cpp | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cassert>
#include<iostream>
#define llong long long
using namespace std;
inline int read()
{
int x=0; bool f=1; char c=getchar();
for(;!isdigit(c);c=getchar()) if(c=='-') f=0;
for(; isdigit(c);c=getchar()) x=(x<<3)+(x<<1)+(c^'0');
if(f) return x;
retur... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpjkf1eqzo.cpp",
"line": 11,
"column": 28,
"severity": "warning",
"message_text": "narrowing conversion from 'int' to signed type 'char' is implementation-defined",
"check_name": "bugprone-narrowing-conversions",
"category": "bugprone",
"mes... | 13 | 74 | true | AtCoder | AtCoder Grand Contest 036 - Negative Cycle | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int N = opt<int>("N");
string type = opt<string>("type", "random");
vector<vector<int>> A(N, vector<int>(N, 0));
if (type == "all_ones") {
for(int i = 0; i <... | # Minimum N with different types
./gen -N 3 -type random
./gen -N 3 -type all_ones
./gen -N 3 -type all_max
./gen -N 3 -type mixed
# Small N
./gen -N 10 -type random
./gen -N 10 -type all_ones
./gen -N 10 -type all_max
./gen -N 10 -type mixed
# Medium N
./gen -N 100 -type random
./gen -N 100 -type all_ones
./gen -N 1... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(3, 500, "N");
inf.readEoln();
for (int i = 0; i < N; ++i) {
vector<int> A = inf.readInts(N - 1, 1, 1000000000);
inf.readEoln();
}... | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cassert>
#include<iostream>
#define llong long long
using namespace std;
inline int read()
{
int x=0; bool f=1; int c=getchar();
for(;!isdigit(c);c=getchar()) { if(c=='-') f=0; }
for(; isdigit(c);c=getchar()) x=(x<<3)+(x<<1)+(c^'0');
if(f) return x;
re... | ```cpp
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cassert>
#include<iostream>
#define llong long long
using namespace std;
inline int read()
{
int x=0; bool f=1; int c=getchar();
for(;!isdigit(c);c=getchar()) { if(c=='-') f=0; }
for(; isdigit(c);c=getchar()) x=(x<<3)+(x<<1)+(c^'0');
if(f) return... | 2,181 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpjkf1eqzo.cpp",
"line": 11,
"column": 28,
"severity": "warning",
"message_text": "narrowing conversion from 'int' to signed type 'char' is implementation-defined",
"check_name": "bugprone-narrowing-conversions",
"category": "bugprone",
"mes... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpg7n3z7ck.cpp",
"line": 12,
"column": 44,
"severity": "warning",
"message_text": "statement should be inside braces",
"check_name": "readability-braces-around-statements",
"category": "readability",
"message_identity": "readability-braces-a... | {
"original_total_messages": 13,
"revised_total_messages": 6,
"old_messages_remaining": 6,
"new_messages_count": 0,
"mrr_at_pass": 0.5384615385,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.2025316456,
"original_loc": 79,
"revised_loc": 81,
"added_lines": 9,
"deleted_lines": 7,
"cate... | null |
p02966_py3_0 | p02966 | train | py3 | N = int(input())
A = [[0] * N for _ in range(N)]
Al = [[0] * (N+1) for _ in range(N+1)]
Ar = [[0] * (N+1) for _ in range(N+1)]
for i in range(N) :
a = [int(i) for i in input().split()]
for j in range(N) :
if i < j :
A[i][j] = a[j-1]
elif i > j :
A[i][j] = a[j]
for ... | [
{
"tool": "pylint",
"file": "/tmp/tmprrg1u_j3.py",
"line": 1,
"column": 16,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"t... | 4 | 27 | true | AtCoder | AtCoder Grand Contest 036 - Negative Cycle | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int N = opt<int>("N");
string type = opt<string>("type", "random");
vector<vector<int>> A(N, vector<int>(N, 0));
if (type == "all_ones") {
for(int i = 0; i <... | # Minimum N with different types
./gen -N 3 -type random
./gen -N 3 -type all_ones
./gen -N 3 -type all_max
./gen -N 3 -type mixed
# Small N
./gen -N 10 -type random
./gen -N 10 -type all_ones
./gen -N 10 -type all_max
./gen -N 10 -type mixed
# Medium N
./gen -N 100 -type random
./gen -N 100 -type all_ones
./gen -N 1... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(3, 500, "N");
inf.readEoln();
for (int i = 0; i < N; ++i) {
vector<int> A = inf.readInts(N - 1, 1, 1000000000);
inf.readEoln();
}... | N = int(input())
A = [[0] * N for _ in range(N)]
Al = [[0] * (N+1) for _ in range(N+1)]
Ar = [[0] * (N+1) for _ in range(N+1)]
for i in range(N):
a = [int(val) for val in input().split()]
for j in range(N):
if i < j:
A[i][j] = a[j-1]
elif i > j:
A[i][j] = a[j]
for i in... | N = int(input())
A = [[0] * N for _ in range(N)]
Al = [[0] * (N+1) for _ in range(N+1)]
Ar = [[0] * (N+1) for _ in range(N+1)]
for i in range(N):
a = [int(val) for val in input().split()]
for j in range(N):
if i < j:
A[i][j] = a[j-1]
elif i > j:
A[i][j] = a[j]
for i in... | 1,069 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmprrg1u_j3.py",
"line": 1,
"column": 16,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"t... | [
{
"tool": "pylint",
"file": "/tmp/tmpyseeparn.py",
"line": 32,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 4,
"revised_total_messages": 2,
"old_messages_remaining": 2,
"new_messages_count": 0,
"mrr_at_pass": 0.5,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 1.0625,
"original_loc": 32,
"revised_loc": 32,
"added_lines": 17,
"deleted_lines": 17,
"category_mrr": {
... | null |
p03165_cpp_0 | p03165 | valid | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t, ans;
cin >> s;
cin >> t;
long long len1 = s.length();
long long len2 = s.length();
long long dp[len1 + 1][len2 + 1];
for (long long i = 0; i <= len1; i++) {
for (long long j = 0; j <= len2; j++) {
if (i == 0 || j == 0) {
... | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpzl1almw3.cpp",
"line": 7,
"column": 20,
"severity": "warning",
"message_text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'long long' is implementation-defined",
"check_name": "bugprone-narrowing-conversions",
... | 5 | 41 | true | AtCoder | Educational DP Contest - LCS | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
string random_string(int len) {
string s = "";
for (int i = 0; i < len; ++i) {
char c = rnd.next('a', 'z');
s += c;
}
return s;
}
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
// Get parameters... | ./gen -n 5 -m 5 -type random
./gen -n 5 -m 5 -type same
./gen -n 5 -m 5 -type opposite
./gen -n 5 -m 5 -type no_common
./gen -n 5 -m 5 -type single_common
./gen -n 5 -m 5 -type long_common_subsequence
./gen -n 5 -m 5 -type alternating
./gen -n 100 -m 100 -type random
./gen -n 100 -m 100 -type same
./gen -n 100 -m 100 ... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
bool isSubsequence(const string& sub, const string& str) {
size_t pos = 0;
for (char c : str) {
if (pos < sub.size() && c == sub[pos]) {
++pos;
}
}
return pos == sub.size();
}
int main(int argc, char* argv[]... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
string s = inf.readLine("^[a-z]+$", "s");
ensuref(1 <= s.length() && s.length() <= 3000, "Length of s must be between 1 and 3000, but it is %d", int(s.length()));
strin... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t, ans;
cin >> s;
cin >> t;
long long len1 = static_cast<long long>(s.length());
long long len2 = static_cast<long long>(t.length());
vector<vector<long long>> dp(len1 + 1, vector<long long>(len2 + 1));
for (long long i = 0; i <= len1; i... | ```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t, ans;
cin >> s;
cin >> t;
long long len1 = static_cast<long long>(s.length());
long long len2 = static_cast<long long>(t.length());
vector<vector<long long>> dp(len1 + 1, vector<long long>(len2 + 1));
for (long long i = 0; i <= ... | 1,250 | null | true | null | true | null | [
{
"tool": "clang-tidy",
"file": "/tmp/tmpzl1almw3.cpp",
"line": 7,
"column": 20,
"severity": "warning",
"message_text": "narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'long long' is implementation-defined",
"check_name": "bugprone-narrowing-conversions",
... | [] | {
"original_total_messages": 5,
"revised_total_messages": 0,
"old_messages_remaining": 0,
"new_messages_count": 0,
"mrr_at_pass": 1,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0.2926829268,
"original_loc": 41,
"revised_loc": 41,
"added_lines": 6,
"deleted_lines": 6,
"category_mrr": {... | null |
p03328_py3_0 | p03328 | train | py3 | a,b = input().split(' ')
c = b - a
print(a - (c - 1)) | [
{
"tool": "pylint",
"file": "/tmp/tmpcxmv8v11.py",
"line": 5,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
{... | 2 | 3 | true | AtCoder | AtCoder Beginner Contest 099 - Stone Monument | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n", 998); // Maximum i value
string type = opt<string>("type", "random"); // Type of test case
int a, b, x; // The visible heights and snow depth
int... | ./gen -n 998 -type random
./gen -n 998 -type random
./gen -n 998 -type random
./gen -n 998 -type random
./gen -n 998 -type random
./gen -n 998 -type min_x
./gen -n 998 -type max_x
./gen -n 998 -type small_x
./gen -n 998 -type large_x
./gen -n 998 -type min_a
./gen -n 998 -type max_a
./gen -n 2 -type min_i
./gen -n 2... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int a = inf.readInt(1, 499499, "a");
inf.readSpace();
int b = inf.readInt(a + 1, 499499, "b");
inf.readEoln();
ensuref(b - a >= 2 && b - a <= 999, "Invalid valu... | a, b = input().split(' ')
c = int(b) - int(a)
print(int(a) - (c - 1)) | a, b = input().split(' ')
c = int(b) - int(a)
print(int(a) - (c - 1)) | 400 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmpcxmv8v11.py",
"line": 5,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
{... | [
{
"tool": "pylint",
"file": "/tmp/tmpzjxiipq0.py",
"line": 5,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
{... | {
"original_total_messages": 2,
"revised_total_messages": 2,
"old_messages_remaining": 2,
"new_messages_count": 0,
"mrr_at_pass": 0,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 1.2,
"original_loc": 5,
"revised_loc": 5,
"added_lines": 3,
"deleted_lines": 3,
"category_mrr": {
"reada... | null |
p03471_py3_0 | p03471 | train | py3 | N, SUM = map(int,input().split())
X=10000
Y=5000
Z=1000
ans = [-1, -1, -1]
for x in range(SUM//X+1):
for y in range(SUM//Y+1):
rest = SUM-x*X-y*Y
if rest % 1000 == 0:
ans = [x, y, rest//Z]
if sum(ans)==N:
break
else:
ans = [-1,-1,-1... | [
{
"tool": "pylint",
"file": "/tmp/tmpuad7_hzq.py",
"line": 15,
"column": 0,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"t... | 4 | 15 | true | AtCoder | AtCoder Beginner Contest 085 - Otoshidama | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int n = opt<int>("n", -1); // If not specified, n will be assigned later
string type = opt<string>("type", "possible_random");
if (type == "possible_random") {
if ... | # Possible random test cases with varying N
./gen -type possible_random -n 1
./gen -type possible_random -n 2
./gen -type possible_random -n 100
./gen -type possible_random -n 1999
./gen -type possible_random -n 2000
# Random N
./gen -type possible_random
./gen -type possible_random
./gen -type possible_random
./gen -... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int N, Y;
bool solutionExists() {
// Try to find x, y, z such that:
// x + y + z = N
// 10000x + 5000y + 1000z = Y
// x, y, z >= 0 and integers
for (int x = 0; x <= N; x++) {
int remaining_bills = N - x;
int remaini... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(1, 2000, "N");
inf.readSpace();
int Y = inf.readInt(1000, 20000000, "Y");
inf.readEoln();
ensuref(Y % 1000 == 0, "Y = %d is not a multiple o... | N, SUM = map(int, input().split())
X = 10000
Y = 5000
Z = 1000
ans = [-1, -1, -1]
for x in range(SUM // X + 1):
for y in range(SUM // Y + 1):
rest = SUM - x * X - y * Y
if not rest % 1000:
ans = [x, y, rest // Z]
if sum(ans) == N:
break
ans = [-1, ... | N, SUM = map(int, input().split())
X = 10000
Y = 5000
Z = 1000
ans = [-1, -1, -1]
for x in range(SUM // X + 1):
for y in range(SUM // Y + 1):
rest = SUM - x * X - y * Y
if not rest % 1000:
ans = [x, y, rest // Z]
if sum(ans) == N:
break
ans = [-1, ... | 689 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmpuad7_hzq.py",
"line": 15,
"column": 0,
"severity": "warning",
"message_text": "Trailing whitespace",
"check_name": "trailing-whitespace",
"category": "readability",
"message_identity": "trailing-whitespace::Trailing whitespace"
},
{
"t... | [
{
"tool": "pylint",
"file": "/tmp/tmpftdammmg.py",
"line": 15,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 4,
"revised_total_messages": 2,
"old_messages_remaining": 1,
"new_messages_count": 1,
"mrr_at_pass": 0.5,
"new_msg_per_sample_at_pass": 1,
"line_churn_at_pass": 1.6875,
"original_loc": 16,
"revised_loc": 15,
"added_lines": 13,
"deleted_lines": 14,
"category_mrr": {
... | null |
p03604_py3_0 | p03604 | test | py3 | import sys
input = sys.stdin.readline
from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import connected_components
MOD = 10**9 + 7
N = int(input())
ball = (tuple(int(x) for x in row.split()) for row in sys.stdin.readlines())
# x座標を1,2,...,N
# y座標をN+1,N+2,...,N+N
graph = [set() for _ in range(N+N+1)]
f... | [
{
"tool": "pylint",
"file": "/tmp/tmp0zzlvkx2.py",
"line": 104,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | 32 | 94 | false | AtCoder | AtCoder Regular Contest 083 - Collecting Balls | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int N = opt<int>("n");
string type = opt<string>("type", "random");
set<pair<int, int>> positions;
vector<pair<int, int>> balls;
if (type == "random") {
/... | ./gen -n 2 -type random
./gen -n 2 -type impossible
./gen -n 5 -type random
./gen -n 5 -type impossible
./gen -n 5 -type max_same_x
./gen -n 5 -type max_same_y
./gen -n 5 -type line
./gen -n 10 -type random
./gen -n 10 -type impossible
./gen -n 10 -type max_same_x
./gen -n 10 -type max_same_y
./gen -n 10 -type line
... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(2, 100000, "N");
inf.readEoln();
set<pair<int, int>> points;
for (int i = 0; i < 2 * N; i++) {
int xi = inf.readInt(1, N, "x_i");
... | import sys
from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import connected_components
INPUT = sys.stdin.readline
MOD = 10**9 + 7
N = int(INPUT())
ball = (tuple(int(x) for x in row.split()) for row in sys.stdin.readlines())
# x座標を1,2,...,N
# y座標をN+1,N+2,...,N+N
graph = [set() for _ in range(N + N + 1... | ```python
import sys
from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import connected_components
INPUT = sys.stdin.readline
MOD = 10**9 + 7
N = int(INPUT())
ball = (tuple(int(x) for x in row.split()) for row in sys.stdin.readlines())
# x座標を1,2,...,N
# y座標をN+1,N+2,...,N+N
graph = [set() for _ in range... | 2,747 | null | true | null | false | SyntaxError: invalid syntax (line 1) | [
{
"tool": "pylint",
"file": "/tmp/tmp0zzlvkx2.py",
"line": 104,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | [] | null | null |
p03626_java_0 | p03626 | train | java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int n = sc.nextInt();
String s1=sc.next();
String s2=sc.next();
long mod=1000000007;
long ans=1;
for(int i = 0; i<n;){
if(s1.charAt(i)==s2.charAt(i)){
if(i==0){
ans*=3;
... | [
{
"tool": "pmd",
"file": "/tmp/tmpc1siljo1.java",
"line": 8,
"column": 12,
"severity": "warning",
"message_text": "Number 1000000007 should separate every third digit with an underscore",
"check_name": "UseUnderscoresInNumericLiterals",
"category": "readability",
"message_identit... | 3 | 32 | false | AtCoder | AtCoder Beginner Contest 071 - Coloring Dominoes | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int N = opt<int>("N");
string type = opt<string>("type", "random");
int n = N;
vector<vector<char>> grid(2, vector<char>(n, '.'));
vector<char> letters;
for (cha... | ./gen -N 1 -type vertical
./gen -N 1 -type horizontal
./gen -N 1 -type random
./gen -N 2 -type vertical
./gen -N 2 -type horizontal
./gen -N 2 -type random
./gen -N 5 -type vertical
./gen -N 5 -type horizontal
./gen -N 5 -type random
./gen -N 5 -type checkerboard
./gen -N 5 -type snake
./gen -N 10 -type vertical
./g... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(1, 52, "N");
inf.readEoln();
ostringstream oss;
oss << "[a-zA-Z]{" << N << "}";
string pattern = oss.str();
string S1 = inf.readToken(p... | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int n = sc.nextInt();
String s1=sc.next();
String s2=sc.next();
long mod=1_000_000_007L;
long ans=1;
for(int i = 0; i<n;){
if(s1.charAt(i)==s2.charAt(i)){
if(i==0){
ans*=3;
... | ```java
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int n = sc.nextInt();
String s1=sc.next();
String s2=sc.next();
long mod=1_000_000_007L;
long ans=1;
for(int i = 0; i<n;){
if(s1.charAt(i)==s2.charAt(i)){
if(i==0){
... | 794 | null | true | null | false | javac not found -- JDK is not installed | [
{
"tool": "pmd",
"file": "/tmp/tmpc1siljo1.java",
"line": 8,
"column": 12,
"severity": "warning",
"message_text": "Number 1000000007 should separate every third digit with an underscore",
"check_name": "UseUnderscoresInNumericLiterals",
"category": "readability",
"message_identit... | [] | null | {
"pass_at_1": false,
"compile_ok": true,
"tests_generated": 0,
"tests_passed": 0,
"tests_failed": 0
} |
p03832_py3_0 | p03832 | train | py3 | N, A, B, C, D = map(int, input().split())
MOD = 10 ** 9 + 7
fact = [1] * (N + 1)
frev = [1] * (N + 1)
dp = [0] * (N + 1)
dp[0] = 1
for i in range(1, N + 1):
v = fact[i] = (fact[i - 1] * i) % MOD
frev[i] = pow(v, MOD - 2, MOD)
Y = [None] * (N + 1)
for g in range(A, min(N // C, B) + 1):
p = C * g
q = D... | [
{
"tool": "pylint",
"file": "/tmp/tmpdmqnpal_.py",
"line": 24,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | 2 | 20 | true | AtCoder | AtCoder Regular Contest 067 - Grouping | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
const int N_MAX = 1000;
const int N_MIN = 1;
int main(int argc, char* argv[]) {
registerGen(argc, argv, 1);
int N_given = opt<int>("N", -1);
int A_given = opt<int>("A", -1);
int B_given = opt<int>("B", -1);
int C_given = opt<i... | # Specific test cases with provided parameters
./gen -N 1 -A 1 -B 1 -C 1 -D 1
./gen -N 2 -A 1 -B 2 -C 1 -D 2
./gen -N 999 -A 1 -B 999 -C 500 -D 500
./gen -N 1000 -A 1 -B 1000 -C 1 -D 1000
./gen -N 997 -A 2 -B 10 -C 1 -D 5
./gen -N 5 -A 1 -B 5 -C 2 -D 2
./gen -N 1000 -A 500 -B 500 -C 10 -D 10
./gen -N 3 -A 1 -B 3 -C 1 -... | #include "testlib.h"
using namespace std;
int main(int argc, char *argv[]) {
setName("compare ordered sequences of signed int%d numbers", 8 * int(sizeof(long long)));
registerTestlibCmd(argc, argv);
int n = 0;
string firstElems;
while (!ans.seekEof() && !ouf.seekEof()) {
n+... | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int N = inf.readInt(1, 1000, "N");
inf.readSpace();
int A = inf.readInt(1, N, "A");
inf.readSpace();
int B = inf.readInt(A, N, "B");
inf.readSpace();
in... | N, A, B, C, D = map(int, input().split())
MOD = 10 ** 9 + 7
fact = [1] * (N + 1)
frev = [1] * (N + 1)
dp = [0] * (N + 1)
dp[0] = 1
for i in range(1, N + 1):
v = fact[i] = (fact[i - 1] * i) % MOD
frev[i] = pow(v, MOD - 2, MOD)
Y = [None] * (N + 1)
for g in range(A, min(N // C, B) + 1):
p = C * g
q = D... | N, A, B, C, D = map(int, input().split())
MOD = 10 ** 9 + 7
fact = [1] * (N + 1)
frev = [1] * (N + 1)
dp = [0] * (N + 1)
dp[0] = 1
for i in range(1, N + 1):
v = fact[i] = (fact[i - 1] * i) % MOD
frev[i] = pow(v, MOD - 2, MOD)
Y = [None] * (N + 1)
for g in range(A, min(N // C, B) + 1):
p = C * g
q = D... | 934 | null | true | null | true | null | [
{
"tool": "pylint",
"file": "/tmp/tmpdmqnpal_.py",
"line": 24,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | [
{
"tool": "pylint",
"file": "/tmp/tmp7if28koo.py",
"line": 24,
"column": 0,
"severity": "warning",
"message_text": "Final newline missing",
"check_name": "missing-final-newline",
"category": "readability",
"message_identity": "missing-final-newline::Final newline missing"
},
... | {
"original_total_messages": 2,
"revised_total_messages": 2,
"old_messages_remaining": 2,
"new_messages_count": 0,
"mrr_at_pass": 0,
"new_msg_per_sample_at_pass": 0,
"line_churn_at_pass": 0,
"original_loc": 24,
"revised_loc": 24,
"added_lines": 0,
"deleted_lines": 0,
"category_mrr": {
"reada... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.