id
int64
251M
307M
language
stringclasses
11 values
verdict
stringclasses
119 values
source
stringlengths
0
60.3k
problem_id
stringclasses
500 values
type
stringclasses
2 values
difficulty
stringclasses
4 values
294,065,824
Java 21
WRONG_ANSWER on test 2
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Queue; import java.util.Scanner; public class Solution { public static void main(S...
2034C
wrong_submission
easy
303,212,793
Java 21
WRONG_ANSWER on test 2
import java.util.*; import java.lang.*; import java.io.*; public class Codechef { public static class Pair{ char a; int i, j; Pair(char a, int i, int j){ this.a = a; this.i = i; this.j = j; } } public static void main (String[] args) throws ...
2034C
wrong_submission
easy
294,056,745
C++20 (GCC 13-64)
WRONG_ANSWER on test 3
#include<bits/stdc++.h> using namespace std; #define int long long int a[1009][1009],b[1009][1009]; char c[1009][1009]; int ans; int n,m; int dfs(int x,int y){ //cout<<x<<" "<<y<<"\n"; if(x==0||y==0)return 0; if(x>n||y>m)return 0; if(b[x][y])return a[x][y]; b[x][y]=1; if(c[x][y]=='U')if(dfs(x-1,y)){a[x][y]=1;} i...
2034C
wrong_submission
medium
294,160,803
C++20 (GCC 13-64)
WRONG_ANSWER on test 3
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; int dx[] = {0, -1, 0, 1}; int dy[] = {-1, 0, 1, 0}; #define ll long long #define ull unsigned long long // #define debug(x) cout<<#x<<' '<<x<<endl; template...
2034C
wrong_submission
medium
294,076,578
Python 3
TIME_LIMIT_EXCEEDED on test 3
for test in range(int(input())): #bin_tree = Avl_tree() #n = int(input()) n, m = map(int, input().split()) a = [] for i in range(n): a.append(str(input())) #s = str(input()) #s = list(map(int, list(str(input())))) #r = list(map(int, list(str(input())))) #b = list(map(int, inp...
2034C
wrong_submission
medium
294,089,475
Python 3
RUNTIME_ERROR on test 3
2034C
wrong_submission
medium
295,248,882
Java 21
RUNTIME_ERROR on test 3
import java.util.ArrayDeque; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.Map; import java.util.Scanner; import java.util.TreeMap; public class Leetcode { public static void main(String[] args) { Scanner sc = new Scanner(System.in); in...
2034C
wrong_submission
medium
294,040,779
Java 8
RUNTIME_ERROR on test 3
import java.io.*; import java.util.*; public class C { public static PrintWriter out; // static boolean good; static int n, m; static int dx[]= {-1, 1, 0, 0}; static int dy[]= {0, 0, -1, 1}; static char grid[][]; public static void main(String[] args)throws IOException{ JS sc=new JS(); out=new Pri...
2034C
wrong_submission
medium
303,703,192
C++23 (GCC 14-64, msys2)
TIME_LIMIT_EXCEEDED on test 5
#include <bits/stdc++.h> using namespace std; #define ll long long #define take(n) \ ll n; \ cin >> n; #define takearr(arr, n) \ ll arr[n]; \ for (ll i = 0; i < n; i++) \ cin >> arr[i]; // rep(i, 0, n-1){}; loop from 0 to n-1 #define vl vector<ll> #define takevec(v, ...
2034C
wrong_submission
hard
304,691,037
Python 3
TIME_LIMIT_EXCEEDED on test 5
def dfs(grid, visited, trapped, x, y, n, m): if visited[x][y]: return True # Cycle detected if trapped[x][y] != -1: return trapped[x][y] visited[x][y] = True trapped[x][y] = False directions = {'U': (-1, 0), 'D': (1, 0), 'L': (0, -1), 'R': (0, 1)} for direction in...
2034C
wrong_submission
hard
294,044,811
PyPy 3-64
MEMORY_LIMIT_EXCEEDED on test 5
t = int(input()) for _ in range(t): n, m = map(int, input().split()) grid = [list(input()) for _ in range(n)] dir_map = {'U': (-1, 0), 'D': (1, 0), 'L': (0, -1), 'R': (0, 1)} reverse_graph = {} escape_cells = set() specified_cells = set() for i in range(n): for j in range(m): ...
2034C
wrong_submission
hard
294,081,172
Java 21
TIME_LIMIT_EXCEEDED on test 5
import java.util.*; import java.io.*; public class Solution { public static char[][] grid; // public static int[][] status; public static Set<String> trapp; public static void main(String args[]) { Scanner sc = new Scanner(System.in); int T = sc.nextInt(); char[] dir = { 'U', 'D', 'L', 'R' }; ...
2034C
wrong_submission
hard
294,119,821
Java 21
TIME_LIMIT_EXCEEDED on test 5
import java.util.*; import java.io.*; import java.awt.Point; public class TrappedInTheWitchsLabyrinth { static HashMap<Pair, List<Pair>> adj; static boolean[][] visited; static char[][] grid; public static void main(String[] args) throws Exception { BufferedReader in = new BufferedReader(new InputStreamReader...
2034C
wrong_submission
hard
294,073,385
C++17 (GCC 7-32)
WRONG_ANSWER on test 7
#include<bits/stdc++.h> using namespace std; #ifndef ONLINE_JUDGE #include <Debug.h>; #else #define dbg(...) #endif #define nl "\n" #define ff first #define ss second #define ll long long #define ld long double #define pb push_ba...
2034C
wrong_submission
hard
271,199,233
C++20 (GCC 13-64)
OK
/** * author: tourist * created: 18.07.2024 23:39:40 **/ #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "algo/debug.h" #else #define debug(...) 42 #endif int main() { ios::sync_with_stdio(false); cin.tie(0); int tt; cin >> tt; while (tt--) { int n, x; cin >> n >> x;...
1994C
right_submission
none
271,213,680
C++17 (GCC 7-32)
OK
#include<bits/stdc++.h> #define L(i, j, k) for(int i = (j); i <= (k); ++i) #define R(i, j, k) for(int i = (j); i >= (k); --i) #define ll long long #define vi vector <int> #define sz(a) ((int) (a).size()) #define me(f, x) memset(f, x, sizeof(f)) #define ull unsigned long long using namespace std; const int N = 2e5 + 7;...
1994C
right_submission
none
271,202,592
C++20 (GCC 13-64)
OK
#include <bits/stdc++.h> using i64 = long long; void solve() { int n, x; std::cin >> n >> x; std::vector<int> a(n); for (int i = 0; i < n; i++) { std::cin >> a[i]; } std::vector<i64> s(n + 1); for (int i = 0; i < n; i++) { s[i + 1] = s[i] + a[i]; } ...
1994C
right_submission
none
277,678,477
C++17 (GCC 7-32)
WRONG_ANSWER on test 2
#include <bits/stdc++.h> using namespace std; #define ll long long #define f(i,n) for(ll i=0; i<n; ++i) #define pii pair<ll,ll> #define pll pair<ll,ll> #define pb push_back #define fi first #define s second #define pqmax priority_queue<ll> #define pqmin priority_queue<ll,vector<ll>,greater<ll>> #define vi vector<ll> #...
1994C
wrong_submission
easy
271,268,409
C++20 (GCC 13-64)
WRONG_ANSWER on test 2
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define pi 3.141592653589793230 #define P 1000000007 #define fs fixed << setprecision #define ll long long #define fi for (ll i=0; i<n; ++i) #define fj for (ll j=0; j<m; ++j) #define test ll t; cin >> t; while(t--) #...
1994C
wrong_submission
easy
271,234,332
C++20 (GCC 13-64)
WRONG_ANSWER on test 2
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define int long long #define float double #define all(x) (x).begin(), (x).end() #define pnl cout << "\n" #ifndef ONLINE_JUDGE #define dbg(x) cerr << (#x) << " " << (x) << "\n" #else #define dbg(x) 42 #endif using...
1994C
wrong_submission
easy
271,240,509
Python 3
WRONG_ANSWER on test 2
t = int(input()) for _ in range(t): n, x = map(int, input().split()) lst = list(map(int, input().split())) l = 0 r = 0 summa = 0 res_lst = [] while True: if summa <= x: if r >= n: break summa += lst[r] r += 1 else: ...
1994C
wrong_submission
easy
271,249,846
PyPy 3-64
WRONG_ANSWER on test 2
import sys input = sys.stdin.readline from math import pi, inf, atan2, isqrt, comb, prod from heapq import nsmallest, nlargest, heapify, heappop, heappush from bisect import bisect_left, bisect_right from collections import Counter, defaultdict, deque from itertools import accumulate, count, combinations, permutations,...
1994C
wrong_submission
easy
271,250,645
PyPy 3-64
WRONG_ANSWER on test 2
import sys import heapq from math import ceil, inf from collections import defaultdict , Counter, deque from bisect import bisect_left , bisect_right import sys, threading import random mod = pow(10, 9) + 7 randint = random.randint(1, 1000000) def ip(): return int(input()) def input(): return sys.stdin.readli...
1994C
wrong_submission
easy
271,244,633
Java 8
WRONG_ANSWER on test 2
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.*; public class CF8 { static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new...
1994C
wrong_submission
easy
271,260,094
Java 21
WRONG_ANSWER on test 2
import java.io.*; import java.util.*; public class Main { static int zu; public static void main(String[] args) { zu= in.nextInt(); for (int i = 0; i < zu; i++) { solve(); } out.flush(); } static void solve() { int n= in.nextInt(); int x=...
1994C
wrong_submission
easy
271,735,749
C++20 (GCC 13-64)
WRONG_ANSWER on test 4
#include <bits/stdc++.h> using namespace std; typedef long long ll; void solve() { int n; ll x; cin >> n >> x; vector<ll> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } vector<ll> dp(n + 1); int l = 0, r = 0; ll g = 0; while (l < n) { if (g <= x) { if (r < n) { ...
1994C
wrong_submission
medium
271,327,692
C++17 (GCC 7-32)
TIME_LIMIT_EXCEEDED on test 4
#include <bits/stdc++.h> using namespace std; #define intll long long intll x,n; intll getIndex(intll i,vector<intll> vr,vector<intll> prefsum){ if((prefsum[n-1]-(i-1>=0?prefsum[i-1]:0))<x){ return -1; } intll l=i; intll r=n-1; intll ans = -1; while(r-l>=0){ intll mid = (l+r)/...
1994C
wrong_submission
medium
271,480,732
Java 21
WRONG_ANSWER on test 4
import java.util.*; public class contest{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int t = sc.nextInt(); while(t>0){ t--; int n = sc.nextInt(); int x = sc.nextInt(); long[] toxic = new long[n]; ...
1994C
wrong_submission
medium
271,388,418
Java 21
TIME_LIMIT_EXCEEDED on test 4
import java.util.Scanner; public class HungryGames { public static void main(String[] args) { Scanner in = new Scanner(System.in); int t = in.nextInt(); while(t-- > 0) { int n = in.nextInt(); int x = in.nextInt(); int [] a = new int[n]; for(int i = 0; i < n; i++) a[i] = in.nextInt(); int ...
1994C
wrong_submission
medium
285,106,440
C++20 (GCC 13-64)
TIME_LIMIT_EXCEEDED on test 4
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> pii; const int INF = 1e9; const ll LINF = 1e18; const int MOD = 1e9 + 7; #define fast_io ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define all(v) (v).begin(), (v).end() #define sz(x) (int)(x).s...
1994C
wrong_submission
medium
271,234,445
C++17 (GCC 7-32)
WRONG_ANSWER on test 4
#include <bits/stdc++.h> using namespace std; const long long mod = 1e9 + 7; const int MaxN = 2e5 + 5; int n; long long k; long long arr[MaxN]; void Inp() { cin >> n >> k; for (int x = 1; x <= n; x++) { cin >> arr[x]; } } long long sum[MaxN]; int Pre[MaxN]; long long cnt[MaxN]; int B...
1994C
wrong_submission
medium
271,241,853
PyPy 3-64
TIME_LIMIT_EXCEEDED on test 4
t=int(input()) def c(i): if i in d: return d[i] else: f=0 g=0 for j in range(i,n): g+=a[j] if g>x: g=0 f+=c(j+1) break f+=1 return f for _ in range(t): n,x=map(int,input().split())...
1994C
wrong_submission
hard
273,848,251
PyPy 3
TIME_LIMIT_EXCEEDED on test 4
for _ in range(int(input())): count = 0 n, x = map(int, input().split()) mass = [int(i) for i in input().split()] for l in range(n): g = 0 for r in range(l, n): g += mass[r] if g > x: g = 0 else: count += 1 ...
1994C
wrong_submission
hard
271,256,220
Java 21
MEMORY_LIMIT_EXCEEDED on test 4
import java.util.Scanner; public class C { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); for (int z = 0; z < t; z++) { int n = sc.nextInt(); int g = sc.nextInt(); int[] numbers = new int[n]; ...
1994C
wrong_submission
hard
271,261,347
Java 21
TIME_LIMIT_EXCEEDED on test 4
import java.util.*; import java.io.*; public class Solution { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); StringTokenizer st...
1994C
wrong_submission
hard
271,281,899
C++14 (GCC 6-32)
WRONG_ANSWER on test 5
#include<bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; using namespace std; // template<class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; // long long int ans=0; int main() { ...
1994C
wrong_submission
hard
271,380,235
C++17 (GCC 7-32)
TIME_LIMIT_EXCEEDED on test 5
#include <bits/stdc++.h> using namespace std; constexpr int N = 2e5 + 6; long long dp[N]; int b_search(const vector<long long> &sum, int lpos, int l, int r, int x) { --l; ++r; while (l + 1 < r) { int m = l + (r - l >> 1); if (sum[m] - sum[lpos] <= x) { l = m; ...
1994C
wrong_submission
hard
267,327,719
C++20 (GCC 13-64)
OK
#include <bits/stdc++.h> using i64 = long long; void solve() { int x1, y1, x2, y2; std::cin >> x1 >> y1 >> x2 >> y2; std::cout << ((x1 > y1) == (x2 > y2) ? "YES" : "NO") << "\n"; } int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int t; std::cin >> t; ...
1982A
right_submission
none
267,326,853
C++20 (GCC 13-64)
OK
/** * author: tourist * created: 25.06.2024 17:32:28 **/ #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "algo/debug.h" #else #define debug(...) 42 #endif int main() { ios::sync_with_stdio(false); cin.tie(0); int tt; cin >> tt; while (tt--) { int a, b, c, d; cin >> a...
1982A
right_submission
none
271,369,554
C++20 (GCC 13-64)
OK
#include <iostream> #include <stdio.h> #include <cstring> #include <vector> #include <algorithm> #include <math.h> #include <map> #include <queue> #include <string> #include <set> #include <unordered_set> #include <bits/stdc++.h> #define lowerbit(x) (x & -x) #define ll long long using namespace std; void solv...
1982A
right_submission
none
267,374,246
C++17 (GCC 7-32)
WRONG_ANSWER on test 2
/* In the Name of ALLAH */ /** Minhaz Uddin Dept of CSE,Comilla University*/ #include<bits/stdc++.h> #define ll long long #define yes cout<<"YES"<<'\n'; #define no cout<<"NO"<<'\n'; #define gcd(a,b) __gcd(a,b) #define lcm(a,b) (a*b)/gcd(a,b) #define tst int t;cin>>t;while(t--) #define pb push_back #define rvs reve...
1982A
wrong_submission
easy
287,854,887
C++17 (GCC 7-32)
WRONG_ANSWER on test 2
#include<bits/stdc++.h> using namespace std; int main() { long long int t; cin>>t; while(t--) { long long int x1,x2,y1,y2; cin>>x1>>y1; cin>>x2>>y2; long long int sum1 = x1+x2; long long int sum2 = y1+y2; long long int sum3 = sum1 + sum2; if(...
1982A
wrong_submission
easy
267,333,924
C++20 (GCC 13-64)
WRONG_ANSWER on test 2
#include<bits/stdc++.h> using namespace std; const int N = 1e6; using ll = long long; void solve (){ ll a,b,c,d;cin >> a >> b >> c >> d; ll s1 = a-b,s2 = c-d; if(s1 < 0 && s2 > 0 || s1<0 && s2> 0){ cout << "NO" <<'\n'; } else cout << "YES" <<'\n'; } int main (){ ios::sync_with_st...
1982A
wrong_submission
easy
267,344,173
PyPy 3
WRONG_ANSWER on test 2
t = int(input()) for _ in range(t): x1, y1 = map(int, input().split()) x2, y2 = map(int, input().split()) if (x1 < y1 and x2 < y2) or (x1 > y1 and x2 > y1): print("YES") else: print("NO")
1982A
wrong_submission
easy
267,376,317
Python 3
WRONG_ANSWER on test 2
n=int(input()) for i in range(n): a,b=map(int,input().split()) c,d=map(int,input().split()) if c-a==d or c-a==b: print("NO") else: print("YES")
1982A
wrong_submission
easy
267,355,117
Python 3
WRONG_ANSWER on test 2
for _ in range(int(input())): x1,y1=map(int,input().split()) x2,y2=map(int,input().split()) if max(y1,y2)>x1 and max(y1,y2)<=x2 and x1<y1: print("NO") elif max(y1,y2)>x1 and max(y1,y2)<=x2 and x1>y1: print("YES") elif x1==x2 and y1==y2: print("YES") else: print("Y...
1982A
wrong_submission
easy
267,349,954
Java 21
WRONG_ANSWER on test 2
import java.util.Scanner; public class Soccer { public static void main(String[] args){ Scanner sc=new Scanner(System.in); int num=sc.nextInt(); while(num--!=0){ int a=sc.nextInt(); int b=sc.nextInt(); int c=sc.nextInt(); int d=sc.nextInt(); ...
1982A
wrong_submission
easy
267,449,833
Java 21
WRONG_ANSWER on test 2
import java.util.Scanner; public class Soccer { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); Soccer1[] soccer = new Soccer1[n]; for (int i=0;i<n;i++) { int x1=sc.nextInt(); int y1=sc.nextIn...
1982A
wrong_submission
easy
267,369,238
C++20 (GCC 13-64)
WRONG_ANSWER on test 2
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define int ll ll binexp(ll a,ll b, ll m) { ll result = 1; while(b){ if(b&1){ result = (result*a)%m; } a = (a*a)%m; b>>=1; } return result; } int sub_mod(int a, int b, int m) {a %= m;b %= m;return (a - ...
1982A
wrong_submission
medium
267,340,285
C++17 (GCC 7-32)
WRONG_ANSWER on test 2
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vll; bool cMP(ll pS, ll qS, ll pe, ll qe) { return ((pS - qS) % 2) == ((pe - qe) % 2); } signed main(){ int t; cin>>t; while(t--){ ll pS, qS, pe, qe; cin >> pS >> qS >> pe >> qe; if (...
1982A
wrong_submission
medium
267,347,708
Python 3
WRONG_ANSWER on test 2
t = int(input()) for _ in range(t): x1,y1 = map(int, input().split()) x2,y2 = map(int, input().split()) if abs(y2-x1) != abs(x2-y1) : print("YES") elif x1 != x2 or y2!=y1: print("NO") else: print("YES")
1982A
wrong_submission
medium
267,371,415
PyPy 3-64
WRONG_ANSWER on test 2
n = int(input()) for i in range(n): a, b = map(int, input().split()) c, d = map(int, input().split()) v = True while (a!=c) or (b!=d): if a < b : if a != c: if b<c: if a == (b-1) and b==d: a +=1 else: ...
1982A
wrong_submission
medium
287,640,808
Java 21
WRONG_ANSWER on test 2
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner inp = new Scanner(System.in); int n = inp.nextInt(); for (int i = 0; i < n; i++) { int x1 = inp.nextInt(); int y1 = inp.nextInt(); int x2 = inp.nextInt(); ...
1982A
wrong_submission
medium
267,336,517
Java 21
WRONG_ANSWER on test 2
import java.util.*; public class codeforces { public static void main(String[] args) { Scanner s = new Scanner(System.in); int t = s.nextInt(); for (int j = 0; j < t; j++) { int a = s.nextInt(); int b = s.nextInt(); int c = s.nextInt(); int d...
1982A
wrong_submission
medium
267,328,658
Python 3
WRONG_ANSWER on test 2
t = int(input()) for j in range(t): x1, y1 = map(int, input().split()) x2, y2 = map(int, input().split()) if (x1 < y1 and x2 < y2) or (x1 > y1 and x2 > y1): print("yes") else: print("no")
1982A
wrong_submission
hard
267,511,901
Python 3
WRONG_ANSWER on test 2
ans = [] for e in range(int(input())): a, b = map(int, input().split()) a1, b1 = map(int, input().split()) if (a > b and a1 > b) or (a < b and a1 < b1): ans.append("yes") else: ans.append("no") print(*ans, sep="\n")
1982A
wrong_submission
hard
267,816,829
Java 21
WRONG_ANSWER on test 2
import java.util.*; public class soccer{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int t = sc.nextInt(); for(int i=0;i<t;i++){ int x1 = sc.nextInt(); int y1 = sc.nextInt(); int x2 = sc.nextInt(); int y2 = ...
1982A
wrong_submission
hard
284,976,702
Java 21
WRONG_ANSWER on test 2
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for(int i = 0; i < n; i++){ long a = sc.nextLong(); long b = sc.nextLong(); long c = sc.nextLong(); ...
1982A
wrong_submission
hard
267,334,146
C++17 (GCC 7-32)
WRONG_ANSWER on test 3
#include <iostream> #include <vector> using namespace std; int main() { cin.tie(0)->sync_with_stdio(0); int t{}; cin >> t; while (t--) { int x1{}, y1{}, x2{}, y2{}; cin >> x1 >> y1 >> x2 >> y2; if ((x1 - y1) * (x2 - y2) < 0) cout << "NO"; else ...
1982A
wrong_submission
hard
283,019,978
C++20 (GCC 13-64)
WRONG_ANSWER on test 3
#include <bits/stdc++.h> using namespace std; void soccer(int x1, int y1, int x2, int y2) { if ((x1 - y1) * (x2 - y2) > 0) { cout << "YES" << endl; } else { cout << "NO" << endl; } } int main() { int t; cin >> t; while (t--) { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; soccer(x1, y1, x2,...
1982A
wrong_submission
hard
272,110,180
C++20 (GCC 13-64)
OK
#include <bits/stdc++.h> using u32 = unsigned; using i64 = long long; using u64 = unsigned long long; int logi(int a, int b) { int t = 0; i64 v = 1; while (v < b) { v *= a; t++; } return t; } int llog(int a, int b) { if (a <= b) { int l = logi(a, b); return ...
1995C
right_submission
none
272,099,722
C++20 (GCC 13-64)
OK
/** * author: tourist * created: 23.07.2024 10:43:29 **/ #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "algo/debug.h" #else #define debug(...) 42 #endif int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int tt; cin >> tt; while (tt--) { int n; cin >> n; ...
1995C
right_submission
none
272,573,295
C++20 (GCC 13-64)
OK
#include <bits/stdc++.h> //#pragma GCC optimize("03") //#pragma GCC optimize("unroll-loops") //#pragma GCC target("avx,avx2,bmi2,fma") #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; using ll = long long; void solve(), solve1(); ...
1995C
right_submission
none
272,228,949
C++20 (GCC 13-64)
WRONG_ANSWER on test 2
#include <bits/stdc++.h> using namespace std; const long long N = 3e6 + 20, M = 998244353; #define eps 1e-6 #define int long long // #define int __int128 #define all(x) x.begin(), x.end() #define endl '\n' #define ls (p << 1) #define double long double #define rs ((p << 1) | 1) #define f1 first #define pb push_back #de...
1995C
wrong_submission
easy
273,414,450
C++14 (GCC 6-32)
TIME_LIMIT_EXCEEDED on test 2
#include<bits/stdc++.h> using namespace std; int main() { int m = 0; cin >> m; while (m--) { int n = 0; cin >> n; vector<int>arr(n); for (int i = 0; i < n; i++) { cin >> arr[i]; } int sum = 0; int count1 = 0; int flag = true; for (int i = 1; i < n; i++) { if (arr[i] == 1 && arr[i - 1...
1995C
wrong_submission
easy
272,158,062
C++17 (GCC 7-32)
WRONG_ANSWER on test 2
#include<bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) #pragma GCC optimize(1) #pragma GCC optimize(2) #pragma GCC optimize(3,"Ofast","inline") #define int long long const long long MOD=998244353; const int N=2e5+10; int a[N],tp[N]; int base[10]; void solve(){ int n;...
1995C
wrong_submission
easy
276,860,978
PyPy 3-64
WRONG_ANSWER on test 2
def log(x,y) : flag, count = 0, 0 while (y>=x) : if y%x != 0 : flag=1 y//=x count+=1 return count + flag def _log(x,y) : count = 0 while (y>=x) : y//=x count+=1 return count def solve() : n = int(input()) a = [int(x) for x in input()....
1995C
wrong_submission
easy
272,159,629
PyPy 3-64
TIME_LIMIT_EXCEEDED on test 2
from decimal import Decimal def comp(x1: int, y1: int, x2: int, y2: int) -> bool: return y1 * Decimal.ln(Decimal('2')) + Decimal.ln(Decimal.ln(Decimal(x1))) > y2 * Decimal.ln(Decimal('2')) + Decimal.ln(Decimal.ln(Decimal(x2))) def solution(n: int, a: list[int]) -> int: b = [0] * n mx = 0 for i i...
1995C
wrong_submission
easy
272,878,071
Python 3
RUNTIME_ERROR on test 2
import math def solve(): n = int(input()) a = list(map(int, input().split())) try: ind = a.index(1) for i in range(ind): if a[i] > 1: print(-1) return except ValueError: pass maxi = a[0] ans = 0 for i in range(1,...
1995C
wrong_submission
easy
272,679,019
Java 21
WRONG_ANSWER on test 2
import java.util.Scanner; public class prob2{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); int N=sc.nextInt(); for(int x=0;x<N;x++){ int n=sc.nextInt(); int[] arr=new int[n]; double prev=0; int ans=0; ...
1995C
wrong_submission
easy
272,165,361
Java 8
WRONG_ANSWER on test 2
import java.math.BigDecimal; import java.math.MathContext; import java.math.RoundingMode; import java.util.Scanner; public class CF1995C { public static void main(String[] args) { Scanner in = new Scanner(System.in); int Cases = Integer.parseInt(in.nextLine()); outer: for (; Cases > 0; C...
1995C
wrong_submission
easy
273,720,364
C++20 (GCC 13-64)
WRONG_ANSWER on test 3
//ॐ गणपतये नमः ॐ हनुमते नमः ॐ सरस्वत्यै नमः // मन के हारे हार है , मन के जीते जीत #include<bits/stdc++.h> #define ll long long #define ld long double #define vec vector #define pb push_back #define pf push_front #define ppb pop_back #define ppf pop_front #define ff first #define ss second #def...
1995C
wrong_submission
medium
275,976,567
C++20 (GCC 13-64)
WRONG_ANSWER on test 3
#pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include<bits/stdc++.h> using namespace std; /*-----------------------------------------------------Pbds-------------------------------------------------------------------------*/ #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy...
1995C
wrong_submission
medium
272,270,090
PyPy 3-64
TIME_LIMIT_EXCEEDED on test 3
from sys import stdin,stdout input=stdin.readline print=stdout.write for _ in range(int(input())): n=int(input()) a=list(map(int,input().split())) op=0 flag=0 for i in range(1,n): if a[i]==1 and a[i-1]!=1: flag=1 break while a[i]<a[i-1]: a[i]=a[i...
1995C
wrong_submission
medium
272,240,410
PyPy 3-64
TIME_LIMIT_EXCEEDED on test 3
def solve(): n = int(input()) a = list(map(int, input().split())) cnt = 0 for i in range(1, n): if a[i] == 1 and a[i - 1] != 1: print("-1") return else: while a[i] < a[i - 1]: a[i] *= a[i] ...
1995C
wrong_submission
medium
280,538,155
Java 21
TIME_LIMIT_EXCEEDED on test 3
import java.util.*; import java.math.BigInteger; public class square { public static void main(String args[]) { Scanner sc=new Scanner(System.in); int t=sc.nextInt(); while(t-- >0) { int n=sc.nextInt(); BigInteger []arr=new BigInteger[n]; ...
1995C
wrong_submission
medium
272,166,944
Java 21
TIME_LIMIT_EXCEEDED on test 3
import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { int t; Scanner ain = new Scanner(System.in); t = ain.nextInt(); for (int i = 1; i <= t; i++) { int n = ain.nextInt(); int sumi = 0, pan = 1;...
1995C
wrong_submission
medium
272,250,329
C++20 (GCC 13-64)
TIME_LIMIT_EXCEEDED on test 5
#include <bits/stdc++.h> #define int long long #define pb push_back const int M = 1e9 + 7; using namespace std; void solve() { int n; cin >> n; vector<int> a(n);\ vector<double>logs(n); for (int i = 0; i < n; i++) { cin >> a[i]; logs[i]=log10l(a[i]); } int ans = 0; ...
1995C
wrong_submission
hard
272,253,273
C++17 (GCC 7-32)
WRONG_ANSWER on test 5
#include<bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define yes cout<<"YES"<<endl; #define no cout<<"NO"<<endl; ll powerof2 (ll n) { return (ll)log2(n); } void sieve(int n) { bool is_prime[n+1]; is_prime[0]=is_prime[1]=true; for(int i=2; i*i<=n; i++){ if(i...
1995C
wrong_submission
hard
285,361,170
Python 3
WRONG_ANSWER on test 5
import math def main(): t = int(input()) # Precompute powers of 2 pows = [1] * 64 ptr = 2 for i in range(1, 64): pows[i] = pows[i-1] * ptr for _ in range(t): n = int(input()) v = list(map(int, input().split())) # Calculate log2 for each element ...
1995C
wrong_submission
hard
280,460,602
PyPy 3
TIME_LIMIT_EXCEEDED on test 5
from math import * for _ in range(int(input())): n = int(input()) l = list(map(int,input().split())) eps = 1e-9 prev = 1 ans = 0 if(l==sorted(l)): print(0) continue c=0 for i in range(n): if(l[i]==1): c+=1 else: if(c!=l.count(1)): ...
1995C
wrong_submission
hard
272,198,676
Java 21
TIME_LIMIT_EXCEEDED on test 5
import java.util.*; import java.lang.*; import java.io.*; public class Main { public static void main (String[] args) throws java.lang.Exception { // your code goes here Scanner sc=new Scanner(System.in); int t=sc.nextInt(); while(t-->0) { int n=sc.nextInt(); long arr[]=new long[n],b[]=new lon...
1995C
wrong_submission
hard
272,163,112
Java 21
TIME_LIMIT_EXCEEDED on test 5
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class div2Jul23 { static class Scanner { BufferedReader br; StringTokenizer st; public Scanner() { br = new BufferedReader( ...
1995C
wrong_submission
hard
298,291,657
PyPy 3-64
OK
MAX = 10**10 def maxsumsubarray(a, l, r): maxsumendinghere = 0 maxsumsofar = 0 for i in range(l, r + 1): maxsumendinghere = max(maxsumendinghere + a[i], a[i]) maxsumsofar = max(maxsumsofar, maxsumendinghere) return maxsumsofar def minsumsubarray(a, l, r): minsumendinghere = 0 m...
2043C
right_submission
none
298,481,499
PyPy 3-64
OK
for _ in range(int(input())): n = int(input()) a = list(map(int, input().split(' '))) res = [] lowest_highest = [] nums = [[],[],0]#before the odd number, after, the odd number sign = 0 for i in range(n): if a[i] in [1,-1]: nums[sign].append(a[i]) else: ...
2043C
right_submission
none
298,288,940
PyPy 3-64
OK
import sys import math from collections import defaultdict, deque from itertools import permutations, combinations from heapq import heappop, heappush from functools import lru_cache # Enable fast input/output input = sys.stdin.read output = sys.stdout.write def solve(): def range_to_string(start, end): ...
2043C
right_submission
none
298,231,685
Java 21
OK
import com.sun.source.util.Trees; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.HashSet; import java.util.TreeSet; public class Main { public static HashSet<Integer> calc(int[] arr, int l, int r) { if (l > r) { ...
2043C
right_submission
none
301,290,285
Java 21
OK
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc= new Scanner(System.in); int tes=sc.nextInt(); StringBuilder sb=new StringBuilder(); label:while(tes-->0){ int n=sc.nextInt(),i,j,id=0; long a[]=new long[n]; ...
2043C
right_submission
none
298,304,582
Java 21
OK
import java.io.*; import java.util.*; public class r { private static final FastIO sc = new FastIO(); static ArrayList<Long> a = new ArrayList<>(); public static void main(String[] args) { int t = sc.nextInt(); while (t-- > 0) { solve(); } } ...
2043C
right_submission
none
298,241,320
C++23 (GCC 14-64, msys2)
OK
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <set> #include <fstream> #include <cmath> using namespace std; #define INF 1'000'000'000'000'000'000 //#define cin file std::ifstream file("file.in"); std::set<long long> solve() { std::set<long long> ans; int n, ind = 0; ...
2043C
right_submission
none
298,956,829
C++23 (GCC 14-64, msys2)
OK
#ifndef ONLINE_JUDGE #include "debugger.hpp" #else #define dbg(...) 42 #endif #include<bits/stdc++.h> using namespace std; #define int long long #define cyes cout<<"YES\n" #define cno cout<<"NO\n" #define ed cout<<"\n" // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // using ...
2043C
right_submission
none
300,242,130
C++20 (GCC 13-64)
OK
#include<bits/stdc++.h> #include<random> #define ll long long #define pb push_back #define ff first #define ss second #define _ << " " << #define debug(a) cout << #a << "=" << a << endl; #define ALL(a) a.begin(), a.end() #define LLA(a) a.rbegin(), a.rend() #define BOOST cin.tie(0); cout.tie(0); ios_base::sync_with_stdi...
2043C
right_submission
none
298,416,241
C++23 (GCC 14-64, msys2)
OK
#include <bits/stdc++.h> using i64 = long long; using u64 = unsigned long long; using u32 = unsigned; using u128 = unsigned __int128; void solve() { int n; std::cin >> n; std::vector<int> a(n); for (int i = 0; i < n; i++) { std::cin >> a[i]; } int x = 0; while (x < n &&...
2043C
right_submission
none
298,460,166
C++20 (GCC 13-64)
WRONG_ANSWER on test 2
#include<iostream> #include<algorithm> #include<vector> #include<iterator> #include<queue> #include<stack> #include<cmath> #include<limits.h> #include <cstdint> #include<unordered_map> #include<map> #include<set> using namespace std; #define int long long vector<int> pre, a; set<int> ans; int Query(...
2043C
wrong_submission
easy
301,316,149
C++20 (GCC 13-64)
RUNTIME_ERROR on test 2
#include <iostream> #include <queue> #include<map> #include<algorithm> #include<string> #include <stack> #include <math.h> using namespace std; typedef long long LL; typedef pair<LL, LL> PII; typedef pair<int, PII> que; stack<PII>st; //priority_queue< int, vector<int>, less<int> > qu; map < LL, LL >mp; usin...
2043C
wrong_submission
easy
298,592,937
C++17 (GCC 7-32)
WRONG_ANSWER on test 2
#include <bits/stdc++.h> using namespace std; void printrange(int a, int b){ cout << b - a + 1 << "\n"; for(int i = a; i <= b; i++) cout << i << " "; cout << "\n"; } int main(){ int t; cin >> t; while(t--){ int n, idx; cin >> n; idx = n; vector<int> a(n); for(...
2043C
wrong_submission
easy
298,270,930
PyPy 3-64
WRONG_ANSWER on test 2
import sys from math import gcd,ceil,log # Definitions input = lambda: sys.stdin.readline().rstrip("\r\n") mod = pow(10,9)+7 def imap(): # Multiple numbers input return map(int,input().split()) def ilist(): # List input return list(map(int,input().split())) # Starting off def rangeForArr(p): ...
2043C
wrong_submission
easy
298,526,404
Python 3
RUNTIME_ERROR on test 2
t = int(input()) for _ in range(t): n = int(input()) a = list(map(int, input().split())) split = -1 mx = 0 mn = 0 mx_t = 0 mn_t = 0 for i in range(n): if a[i] == -1: mn_t -= 1 mx = max(mx_t, mx) mx_t = 0 elif a[i] == 1: mx_...
2043C
wrong_submission
easy
300,554,086
PyPy 3-64
WRONG_ANSWER on test 2
import sys input = sys.stdin.readline def solve(): n = int(input().strip()) arr = list(map(int, input().split())) l_min, l_max = 0, 0 l_inter = [2*10**9, -2*10**9] x = None for i in range(n): if arr[i] != -1 and arr[i] != 1: x = arr[i] break l_min = mi...
2043C
wrong_submission
easy
298,274,276
Java 21
WRONG_ANSWER on test 2
import java.io.*; import java.util.*; public class CF{ static FastReader sc = new FastReader(); @SuppressWarnings("unused") static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new InputStreamReader(Syst...
2043C
wrong_submission
easy