id int64 251M 307M | language stringclasses 12
values | verdict stringclasses 290
values | source stringlengths 0 62.5k | problem_id stringclasses 500
values | type stringclasses 2
values |
|---|---|---|---|---|---|
291,582,075 | Python 3 | OK | def solve():
n = int(input())
h = map(int, input().split())
m = {}
for i in h:
m[i] = m.get(i, 0) + 1
print(n - max(m.values()))
t = int(input())
for i in range(t):
solve() | 2031A | right_submission |
291,615,319 | Python 3 | OK | from collections import Counter
tc = int(input())
for _ in range(tc):
n = int(input())
v = list(map(int, input().split()))
freq = Counter(v)
max_frequency = max(freq.values())
print(n - max_frequency) | 2031A | right_submission |
300,368,503 | PyPy 3-64 | OK | for _ in range(int(input())):
n=int(input())
a=list(map(int,input().split()))
f={}
for i in a:
if i in f:
f[i]+=1
else:
f[i]=1
mx=max(f.values())
print(n-mx) | 2031A | right_submission |
297,915,599 | Java 8 | OK | import java.util.Scanner;
public class Penchik_and_modern_monument{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0){
int n=sc.nextInt(),min=sc.nextInt(),l=1,m=1;
for(int i=1;i<n;i++){
int a... | 2031A | right_submission |
291,618,956 | Java 21 | OK | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int t = s.nextInt();
while(t-- > 0){
int n = s.nextInt();
int a[] = new int[n];
int min = -1, ans = 0;
for(int i = 0;... | 2031A | right_submission |
291,587,816 | Java 8 | OK | import java.util.*;
import java.io.*;
import static java.lang.Math.*;
import java.util.stream.Collectors;
@SuppressWarnings("unused")
public class Tej {
public static void tej(FastIO sc) {
int n = sc.nextInt();
int[] a = new int[n];
for(int i=0; i<n; i++) a[i] = sc.nextInt();
i... | 2031A | right_submission |
292,881,421 | C++17 (GCC 7-32) | OK | #include <bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define pll pair<long long , long long>
#define vi vector<int>
using namespace std;
ll M = 1000000007;
int MM = 998244353 ;
ll MMM = 1e18 + 4;
ll powpow(ll a, ll b)
{
if(b==1) return a;
ll x = powpow(a,b/2)%M;
if(b%2) retu... | 2031A | right_submission |
293,987,520 | C++20 (GCC 13-64) | OK | #include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <string>
#include <chrono>
#include <deque>
#include<climits>
#include <set>
#include <map>
#include <ctime>
#include<random>
#include <queue>
#include <stack>
#include <unordered_map>
#include<unordered_set>
#define... | 2031A | right_submission |
291,577,066 | C++20 (GCC 13-64) | OK | /**
* author: tourist
* created: 15.11.2024 04:35:20
**/
#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;
... | 2031A | right_submission |
293,196,579 | 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> h(n);
for (int i = 0; i < n; i++) {
std::cin >> h[i];
}
int ans = 0;
for (int l = ... | 2031A | right_submission |
291,583,500 | C++23 (GCC 14-64, msys2) | OK | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>
#define all(vec) vec.rbegin(), vec.... | 2031A | right_submission |
291,601,945 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <iostream>
using namespace std;
int f[51];
int main()
{
int t,i,n,j,a,x;
cin >> t;
for (i=0; i<t; i++){
cin >> n;
x=0;
for (j=0; j<n; j++){
cin >> a;
f[a]++;
x=max(x, f[a]);
}
cout << n-x << '\n';
for (j=0; j<... | 2031A | wrong_submission |
302,464,193 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | #include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
for (int i=0;i<t;i++) {
int n;
cin>>n;
int h[n];
for (int j=0;j<n;j++) {
cin>>h[j];
}
if(n==1)
cout<<0<<endl;
else if(n==2)
cout<<1<<endl;
... | 2031A | wrong_submission |
302,696,674 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | #include <iostream>
using namespace std;
int main (){
int t; cin >> t;
while (t--) {
int n; cin >> n;
int a[n + 1]; a[0] = -1;
int x = 1;
int y = 1;
for (int i = 1; i <= n; i++) {
cin >> a[i];
if (a[i] == a[i - 1]) {
y++;
... | 2031A | wrong_submission |
297,238,572 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include<iostream>
#include<vector>
#include<map>
using namespace std;
int main(){
int t; cin>>t;
while(t--){
int n; cin>>n;
vector<int> arr(n);
for (int i=0; i< n; i++){
cin>>arr[i];
}
map<int, int> mp;
for (int i=0; i< n; i++){
... | 2031A | wrong_submission |
291,596,466 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | #include <string>
#include <algorithm>
#include <iostream>
int main() {
int t;
std::cin >> t;
while (t--) {
int n;
std::cin >> n;
int max = 0;
int prev;
std::cin >> prev;
int cnt = 1;
for (int i = 1; i < n; i++) {
int a;
std::cin >> a;
if (a == prev) {
cnt++;
}
else {
if ... | 2031A | wrong_submission |
291,691,086 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | #include <iostream>
using namespace std ;
int main()
{
int t ;
cin >> t ;
while(t--){
int n ;
cin >> n ;
int arr[n] , hash[n] = {0} ;
for(int i = 0 ; i < n ; i++){
cin >> arr[i] ;
hash[arr[i]]++ ;
}
int maxi = ... | 2031A | wrong_submission |
293,181,607 | C++23 (GCC 14-64, msys2) | WRONG_ANSWER on test 2 | #include<queue>
#include<iostream>
using namespace std;
#define lld long long int
int main(){
long long int testCase,testNum,tempNum,cnt=0;
cin>>testCase;
for (long long int i = 0; i < testCase; i++)
{
cin>>testNum;
priority_queue<int> queue;
cnt=0;
for (lld j = 0; j ... | 2031A | wrong_submission |
291,604,408 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | #include <iostream>
#include <vector>
#include <algorithm>
#include <unordered_set>
#include <string>
#include <queue>
#include <map>
#include <cmath>
#include <set>
#include <fstream>
#define int long long
using namespace std;
signed main() {
int t; cin>>t;
while (t--){
int n; cin>>n;
vec... | 2031A | wrong_submission |
291,638,191 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | #include<iostream>
#include<algorithm>
using namespace std;
const int N = 2e5 + 7;
const int fill = 1e6;
#define ll long long
int a[N];
void solve()
{
int n; cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
int inc = 0, dec = 0;
for (int i = 1; i < n; i++)
{
if (a[i] > a[i - 1])
... | 2031A | wrong_submission |
291,613,792 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
#include<string>
using namespace std;
#define int long long
#define vi vector<long long>
#define pb push_back
#define pp pop_back
#define all(x) x.begin(),x.end()
using ll=long long;
const char nl = '\n';
int min_operations(vector<int>& heights) {
int changes = 0;
int n = heights.siz... | 2031A | wrong_submission |
302,557,617 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | #include <iostream>
#include <vector>
using namespace std;
void solve() {
int t;
cin >> t; // Number of test cases
while (t--) {
int n;
cin >> n; // Number of pillars
vector<int> h(n);
// Input the heights
for (int i = 0; i < n; i++) {
cin >> ... | 2031A | wrong_submission |
291,587,125 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | #define _CRT_SECURE_NO_WARNINGS
#include <math.h>
#include <bitset>
#include <numeric>
#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <iomanip>
#include <math.h>
#include <algorithm>
#include <list>
#include <fstream>
#... | 2031A | wrong_submission |
291,577,952 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | // Problem: A. Пенчик и современная статуя
// Contest: Codeforces - Codeforces Round 987 (Div. 2)
// URL: https://codeforces.com/contest/2031/problem/0
// Memory Limit: 256 MB
// Time Limit: 1000 ms
//
// Powered by CP Editor (https://cpeditor.org)
//#include <bits/stdc++.h>
#include <algorithm>
#include <bitset>
#i... | 2031A | wrong_submission |
291,578,890 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
#define all(x) x.begin(), x.end()
#define pb push_back
#define pii pair<int, int>
#define F first
#define S second
#define watch(x) cout << (#x) << ':' << (x) << '\n';
template<typename T> // print vector
ostream& operator<<(ostream... | 2031A | wrong_submission |
291,615,646 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | #include<iostream>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int n;
cin >> n;
if (n == 1)
{
cout << 0 << endl;
continue;
}
int ans;
int res = 0;
cin >> ans;
for (int i = 1; i < n; i++)
{
int m;
cin >> m;
if (ans > m)
{
res++;
continue;
... | 2031A | wrong_submission |
291,617,790 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
#define sz(s) (int)s.size()
#define all(v) (v.begin(),v.end())
#define ll long long
#define gcd __gcd
#define endl "\n"
using namespace std;
void Tosy(){
///freopen("output.txt",'w',stdout);
///freopen("input.txt",'r',stdin);
ios::sync_with_stdio(0);
cin.tie(nullptr);
cout.t... | 2031A | wrong_submission |
291,663,402 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void fast_io() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
}
int main() {
fast_io();
int t;
cin >> t;
while(t--){
int a;
cin >> a;
vector<int> v(a);
for (int i = 0; i < a; i++) {
cin >> v[i];
}
int count =... | 2031A | wrong_submission |
291,633,911 | C++23 (GCC 14-64, msys2) | WRONG_ANSWER on test 2 | #include <iostream>
#include <vector>
#include <climits>
using namespace std;
int mins(int n, vector<int>& h) {
int maxs = INT_MAX;
int ops = 0;
for (int i = n - 1; i >= 0; --i) {
if (h[i] > maxs) {
ops++;
maxs = h[i];
}
else {
maxs = min(maxs,... | 2031A | wrong_submission |
291,582,723 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | /**
* author: feev1x
* created: 15.11.2024 18:36:26
**/
#include <bits/stdc++.h>
using i64 = long long;
int main() {
int tt; scanf("%d", &tt);
while (tt--) {
int n; scanf("%d", &n);
std::vector<int> a(n);
for (auto &u: a) {
scanf("%d", &u);
}
std::vector<std::pair<int, int>> v... | 2031A | wrong_submission |
295,953,745 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
#define f(i, n) for (ll i = 0; i < n; i++)
#define f1(i, n) for (ll i = 1; i <= n; i++)
#define rf(i, n) for (ll i = n-1; i >= 0; i--)
#define rep(i, j, n) for (ll i = j; i < n; i++)
#define ll long long
#define vi vector<ll>
#define vp vector<pair<ll,ll>>
#define pb push_back
#define all(v) v.b... | 2031A | wrong_submission |
291,629,239 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using namespace std;
int main () {
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
vector<int> arr(n);
for (int i=0; i<n; i++) {
cin >> arr[i];
}
int res = 0;
for (int i=0; i<n-1; i++) {
... | 2031A | wrong_submission |
291,676,064 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin>>t;
while(t--){
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++){
cin>>a[i];
}
int c=0;
if(n==1){
cout<<c<<endl;
}
else{
for(int i=0;i<n-1;i++){
... | 2031A | wrong_submission |
291,625,732 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define VI vector<int>
#define VII vector<vector<int>>
#define PI pair<int,int>
#define PII vector<pair<int,int>>
#define MI map<int,int>
#define MII map<int,map<int,int>>
#define SI set<int>
#define endl '\n'
using ll=long long;
usi... | 2031A | wrong_submission |
291,589,091 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define HABIBA ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define F first
#define S second
#define LL long long
#define lp \
int _ = 1; \
cin >> _; \
while (_--)
#define sorting sort(a, a + n);
... | 2031A | wrong_submission |
302,269,175 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using namespace std;
#define int long long
int mod=1e9+7;
bool cmp(pair<int,int> a ,pair<int,int>b){
return a.second<b.second;
}
int modPow(int base, int exponent, int mod) {
int result = 1;
base = base % mod;
while (exponent > 0) {
if (exponent % 2 == 1) {
... | 2031A | wrong_submission |
291,577,464 | C++23 (GCC 14-64, msys2) | WRONG_ANSWER on test 2 | #include<iostream>
#include<vector>
#include<string.h>
#include<set>
#include<algorithm>
#include<string>
#include<cstring>
#include<unordered_map>
#include<map>
#include<queue>
#include<stack>
#include<cmath>
#include<fstream>
#include<ctime>
#include<array>
#include<bitset>
#include<iomanip>
#include <stdlib.h>
#incl... | 2031A | wrong_submission |
291,580,395 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ld long double
constexpr int INF = 2e18;
constexpr int MOD = 1e9 + 7;
#define all(x) begin(x), end(x)
#define Sort(x) sort(all(x))
#define rev_sort(x) sort(all(x), greater<int>())
void solve()
{
int n; cin >> n;
vector<int> h(n)... | 2031A | wrong_submission |
291,834,860 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | /*
_ _ _
__ _ _ ___ |__ __ _ | |
| |/ / | | | | / __| | '_ \ / _` | | |
| < | |_| | \__ \ | | | | | (_| | | |
|_|\_\ \__,_| |___/ |_| |_| \__,_| |_|
*/
#include<iostream>
#include<vector>
#include<map>
#include<algorithm>
#include<string>
#include <bits/s... | 2031A | wrong_submission |
291,585,564 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<=n;i++)
#define all(p) p.begin(),p.end()
#define int long long
using namespace std;
void solve() {
int n;
cin >> n;
vector<int> h(n + 1);
rep(i, 1, n) cin >> h[i];
int mx = h[1],mi=h[n], cnt1 = 0, cnt2=0;
rep(i, 2, n) {
if (h[i] < mx) cnt1++;
mx = max(h... | 2031A | wrong_submission |
291,580,806 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | // problem statement:
#include <bits/stdc++.h>
using namespace std;
constexpr int MAXN = 50 + 10;
int T, n;
int a[MAXN];
int main()
{
ios::sync_with_stdio(false);
cin >> T;
while (T--) {
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
int ans = ... | 2031A | wrong_submission |
291,600,101 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using namespace std;
int t,n;
int a[1000];
void solve(){
int all = 0;
cin >> n;
for(int i = 1; i <= n ; i++){
cin >> a[i];
}
for(int i = 1; i<n;i++){
if(a[i+1] < a[i]){
a[i+1] = a[i];
all++;
}
else{
continue;
}
}
cout << all << endl;
}
int main(){
cin >> t;
while(t--... | 2031A | wrong_submission |
291,613,300 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int n;
cin >> n;
vector<int> a(n);
for (auto &x : a)
{
cin >> x;
}
int ans = 0;
for (int i = 0; i < n - 1; i++)
{
if... | 2031A | wrong_submission |
291,600,289 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define vb vector<bool>
#define vvi vector<vector<int>>
#define vvb vector<vector<bool>>
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define endl '\n'
using namespace std... | 2031A | wrong_submission |
291,612,562 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
using namespace std;
#define endl '\n'
#define int long long
const int MOD = 1e9+7;
const int INF = LONG_MAX >> 1;
signed main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
int tc;
cin >> tc;
while (tc--) {
int n;
cin >> n;
vector<int>... | 2031A | wrong_submission |
291,641,453 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #pragma GCC optimize(O2)
#include<bits/stdc++.h>
#define int long long
using namespace std;
void solve(){
//<=
int n;cin>>n;
if(n==1){
cout<<0<<"\n";
return;
}
vector<int>b(n+1);
for(int i=1;i<=n;i++) cin>>b[i];
int ans=1e18;
for(int i=1;i<n;i++){
... | 2031A | wrong_submission |
291,639,281 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--){
int n;
cin>>n;
vector<int>vec;
for(int i=0;i<n;i++){
int x;
cin>>x;
vec.push_back(x);
}
if(n==1){
cout<<0<<endl;
continue;
}
int a=vec[0];
int sum=0;
for(int i=1;i<n;i++){
if(a!=vec[i... | 2031A | wrong_submission |
297,162,637 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
#define int long long
using namespace std;
#define pb push_back
#define vc vector
#define pii pair <int, int>
#define pn cout<<"NO"<<endl
#define py cout<<"YES"<<endl
void solve(){
int n;cin>>n;
vector<int> v(n),fq(n+1,0);
for(int i=0;i<n;i++){
cin>>v[i];
fq[v[i]]+... | 2031A | wrong_submission |
291,595,624 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using namespace std;
int t,n;
vector<int> h;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cin>>t;
while(t--){
cin>>n;
h.resize(n);
for(int i=0;i<n;i++){
cin>>h[i];
}
int ans=0,ans2=0;
for(int i=1;i<n;i++){
... | 2031A | wrong_submission |
292,786,252 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | /***************
Author : Lakshay Dhiman
********************/
#include<bits/stdc++.h>
using namespace std;
void dbg_out() { cerr << endl; }
template<typename Head, typename... Tail>
void dbg_out(Head H, Tail... T) { cerr << ' ' << H; dbg_out(T...); }
#define dbg(...) cerr << "(" << #__VA_ARGS__ << "):", dbg_out... | 2031A | wrong_submission |
291,579,269 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define REP(i,a,b) for (int i = a; i <= b; i++)
typedef long long ll;
typedef long long int lli;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
const int INF = 1e9; // 10... | 2031A | wrong_submission |
291,587,774 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define in(a, b) for (ll i = (a); i <= (b); i++) // in using i
#define inj(a, b) for (ll j = (a); j <= (b); j++) // in using j
#define ink(a, b) for (ll k = (a); k <= (b); k++) // in... | 2031A | wrong_submission |
291,597,751 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
#include <bits/stdc++.h>
using namespace std;
#define pi 3.141592653
#define rev reverse
#define rep(i,n) for (long long i = 0; i < n; i++)
#define rep_a(i,a,n) for (long long i = a; i < n; i++)
#define drep(i,n) for (long long i = n-1; 0 < i+1; i--)
#define all(a) (a).begin(),(a).end()
#define... | 2031A | wrong_submission |
291,623,142 | Java 21 | WRONG_ANSWER on test 2 | import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int t = scanner.nextInt();
for (int i = 0; i < t; i++) {
int n = scanner.nextInt();
int[] heights = new int[n];
... | 2031A | wrong_submission |
300,344,789 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin >> t;
while(t--) {
vector<int> arr;
int n;
cin >> n;
arr.clear();
arr.resize(n);
for(auto &z : arr) cin >> z;
int countOn = 0;
for(int i = 0; i < n; i++) {
... | 2031A | wrong_submission |
291,578,393 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define ll long long
#define endl '\n'
const ll N = 2e5 + 5, MOD = 998244353;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("C:\\Users\\zisak\\CLionProjects\\problemsolvin... | 2031A | wrong_submission |
291,588,809 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using namespace std;
int main(){
int T; cin>>T;
while(T--){
int n; cin>>n;
vector<int> v(n);
for(int i=0; i<n; i++) cin>>v[i];
int i = 0;
int s = 1;
while(i < n){
int prev = i;
if(i + 1 < n && v[i] == v[i + 1]){... | 2031A | wrong_submission |
293,078,205 | Java 21 | WRONG_ANSWER on test 2 | import java.util.Scanner;
public class PMMonument {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0) {
int n = sc.nextInt();
int[] h= new int[n];
for(int i = 0; i < n; i++ ){
... | 2031A | wrong_submission |
292,960,108 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | #include <algorithm>
#include <iostream>
#include <cmath>
#include <bits/stdc++.h>
#include <fstream>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define Ahmed cin.tie(0), cout.tie(0), cin.sync_with_stdio(0), cout.sync_with_stdio(0);
#define all(v) v.begin(), v.end()
#define allRev... | 2031A | wrong_submission |
301,672,517 | Java 21 | WRONG_ANSWER on test 2 | //package codeforces;
import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
public class submission {
public static void main(String[] args) {
int cases = sc.nextInt();
while (cases-- > 0) {
int n = sc.nextInt();
int[] h = new int[n];
int s = 0;
int t = 0;
for (int i = ... | 2031A | wrong_submission |
291,599,044 | Java 21 | WRONG_ANSWER on test 2 | import java.util.*;
public class A_Penchick_and_Modern_Monument {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
while (T-- > 0) {
int N = sc.nextInt();
int arr[] = new int[N];
for (int i = 0; i < N; i... | 2031A | wrong_submission |
298,958,024 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
#define ll long long
#define lli long long int
#define lld long long double
#define ull unsigned long long
#define mxt(a) *max_element(a.begin(),a.end())
#define mnt(a) *min_element(a.begin(),a.end())
#define mxti(a,i,j) *max_element(a.begin()+i+1,a.begin()+j+1)
#define mnti(a,i,j) *min_... | 2031A | wrong_submission |
300,466,726 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
void solve() {
ll n;
cin >> n;
vector<ll> vc(n);
for (ll i = 0; i < n; i++) cin >> vc[i];
vector<ll> prev = vc ;
ll cnt = 0 ;
for(ll i = 1 ; i<n ; i++){
if(vc[i]<vc[i-1]){
vc[i] = vc[i-1];
... | 2031A | wrong_submission |
291,585,040 | Java 21 | WRONG_ANSWER on test 2 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int x = 0; x < t; x++) {
int n = sc.nextInt() ;
int count = 0 ;
int pre = 0 ;
for(int i = 0 ;... | 2031A | wrong_submission |
302,773,038 | Java 21 | WRONG_ANSWER on test 2 | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int t = scanner.nextInt();
while (t-- > 0) {
int n = scanner.nextInt();
int[] h = new int[n];
for (int i... | 2031A | wrong_submission |
291,677,272 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
ll t;
cin>>t;
while(t--)
{
ll n;
cin>>n;
vector<ll>v;
for(ll i=0; i<n; i++)
{
ll x;
cin>>x;
v.push_back(x);
}
set<int> uniqueEl... | 2031A | wrong_submission |
292,793,573 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define int long long
#define pb push_back
#define f(i, s, n) for (int i = s; i < n; i++)
#define fr(i, n, s) for (int i = n; i >= s; i--)
#define fa(ele, vec) for (auto ele : vec)
#define pii pair<int, int>
#define pyes cout << "YES"
#define pno cout... | 2031A | wrong_submission |
292,351,163 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
void solve()
{
ll op=0;
ll n;
cin>>n;
vector<ll>v(n+1);
for(ll i=1;i<=n;i++)
{
cin>>v[i];
if(i!=1&&v[i]<v[i-1])
{
op+=1;
v[i]=v[i-1];
}
}
cout<<op<<endl;
}
int main() {
ll t;
cin >> t;
while (t--) {
solve();
}
ret... | 2031A | wrong_submission |
300,824,342 | Java 21 | WRONG_ANSWER on test 2 | import java.util.*;
public class main{
public static void main(String[] args){
Scanner in= new Scanner(System.in);
int t=in.nextInt();
while(t-->0){
int n = in.nextInt();
in.nextLine(); // Consume the leftover newline
// Read a ... | 2031A | wrong_submission |
292,679,263 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAX = 200'007;
//int res[MAX];
#define all(x) (x).begin(), (x).end()
#define revall(x) (x).rbegin(), (x).rend()// reverse vector. put vector name instead of x
void X() {
long long n, m, k, a = 0, b = 0, c, sum = 0, cnt1 = 0, cnt2 = 0,... | 2031A | wrong_submission |
292,483,801 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
using namespace std;
int t,n,dp[100],h[100];
int main(){
scanf("%d",&t);
while(t--){
scanf("%d",&n);
for(int i=1;i<=n;i++)scanf("%d",&h[i]);
dp[1]=1;
for(int i=2;i<=n;i++){
for(int j=i-1;j>=1;j--){
if(h[i]>=h[j])dp[i]=ma... | 2031A | wrong_submission |
293,301,546 | Java 8 | WRONG_ANSWER on test 2 | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner fs=new Scanner(System.in);
int t=fs.nextInt();
for(int k=0;k<t;k++){
int n=fs.nextInt();
int arr[]=new int[n];
for(int i=0;i<n;i++){
arr[i]=fs.nextInt()... | 2031A | wrong_submission |
291,893,422 | Java 21 | WRONG_ANSWER on test 2 | import java.util.Scanner;
public class A_Penchick_and_Modern_Monument {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int t = scanner.nextInt();
while (t-- > 0) {
int n = scanner.nextInt();
int[] h = new int[n];
... | 2031A | wrong_submission |
294,374,483 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
using namespace std;
int a[200001];
int main(){
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
int t;
cin>>t;
while(t--){
int n;
cin>>n;
for(int i=1;i<=n;i++) cin>>a[i];
int f=1;
for(int i=1;i<=n&&f;i++){
if(a[i]<a[i-1]){
cout<<n-i+1<<"\n";
f=0;
}
}
if(f==1... | 2031A | wrong_submission |
291,587,672 | Java 21 | WRONG_ANSWER on test 2 | import java.util.*;
public class A{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-- > 0){
int n = sc.nextInt();
int arr[] = new int[n];
int max = 0;
for(int i=0; i<n; i++){
... | 2031A | wrong_submission |
293,223,334 | Java 21 | WRONG_ANSWER on test 2 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class A_Penchick_and_Modern_Monument {
public static void main(String[] args) {
FastScanner fs = new FastScanner();
int T = fs.nextInt();
... | 2031A | wrong_submission |
293,980,037 | C++23 (GCC 14-64, msys2) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
using namespace std;
#define M__K ios::sync_with_stdio(false); cin.tie(0);
#define lcm(a, b) ((a) * (b) / (__gcd((a), (b))))
#define ll long long int
#define vi vector<int>
#define vll vector<long long>
#define vch vector<char>
#define vstr vector<string>
#define pii pair<int, int>
#define pll... | 2031A | wrong_submission |
291,594,831 | Java 21 | WRONG_ANSWER on test 2 | import java.util.*;
public class Main
{
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int testcases = scanner.nextInt();
int count =0;
int first =0;
for(int j=0;j<testcases;j++)
{
int bilnumber = scanner.nextIn... | 2031A | wrong_submission |
291,620,354 | Java 21 | WRONG_ANSWER on test 2 | import java.util.*;
public class Penchickandmonument {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0){
int n=sc.nextInt();
int[] arr=new int[n];
for(int i=0;i<n;i++){
arr[i]=sc.nextInt();
... | 2031A | wrong_submission |
291,597,151 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using namespace std;
//
void testcase (void)
{
int n, h[55], f[55];
//
cin >> n;
for (int i = 1; i <= n; ++i)
cin >> h[i];
memset(f, 0, sizeof f);
f[1] = 1;
for (int i = 2; i <= n; ++i)
for (int j = 1; j < i; ++j)
if (h[j] <= h[i])
... | 2031A | wrong_submission |
291,605,366 | Java 21 | WRONG_ANSWER on test 2 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int t = scanner.nextInt();
for (int j = 0; j < t; j++)
{
int n = scanner.nextInt();
int... | 2031A | wrong_submission |
291,583,410 | Java 21 | WRONG_ANSWER on test 2 | import java.util.*;
public class A_Penchick_and_Modern_Monument {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-- > 0){
int n = sc.nextInt();
int a[] = new int[n];
for(int i = 0; i < n; i++){
... | 2031A | wrong_submission |
291,592,455 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
#define FAST_IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define dbg(x) cout<<#x<<" = "<<x<<'\n';
#define yes cout<<"YES"<<'\n';
#define no cout<<"NO"<<'\n';
#define ll long long
#define MOD 1e9 + 7
#define nl '\n'
using namespace std;
void solve(){
int n;
cin >> n;
ve... | 2031A | wrong_submission |
291,620,970 | Java 21 | WRONG_ANSWER on test 2 | import java.util.*;
public class Q_19 {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0) {
int n = sc.nextInt();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] =... | 2031A | wrong_submission |
291,610,297 | Java 21 | WRONG_ANSWER on test 2 | import java.util.Scanner;
public class penchickAndModernMonument {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int tests = sc.nextInt();
for(int i=0; i<tests; i++){
int n = sc.nextInt();
int[] h = new int[n];
for(int j=... | 2031A | wrong_submission |
291,777,240 | Java 21 | WRONG_ANSWER on test 2 | import java.util.*;
public class _2031A_Penchick {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-->0){
int n = sc.nextInt();
int arr[] = new int[n];
for(int i = 0; i<n; i++){
arr... | 2031A | wrong_submission |
291,598,489 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using u32 = unsigned;
using i64 = long long;
using u64 = unsigned long long;
void solve() {
int n;
std::cin >> n;
std::vector<int> h(n);
for (int &i: h) {
std::cin >> i;
}
bool ok = false;
int ans = 0;
for (int i = 0; i < n - 1; i++) {
if (h[i... | 2031A | wrong_submission |
291,644,353 | Java 21 | WRONG_ANSWER on test 2 | import java.util.*;
public class practice{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
for(int i=0;i<a;i++){
int b = sc.nextInt();
int [] arr = new int[b];
for(int k=0;k<b;k++){
ar... | 2031A | wrong_submission |
291,604,556 | Java 8 | WRONG_ANSWER on test 2 | import java.util.*;
public class Main{
public static void main(String arr []){
Scanner s=new Scanner(System.in);
int t=s.nextInt();
while(t-->0){
int n=s.nextInt();
int a[]=new int[n];
for(int i=0;i<n;i++){
a[i]=s.nextInt();
}
... | 2031A | wrong_submission |
291,582,729 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | //#include <bro is motivated>;
#include <bits/stdc++.h>
using namespace std;
int n, t, a[60];
int main(){
cin >> t;
while(t--) {
cin >> n;
int count = 0;
for(int i = 0; i < n; i++)
cin >> a[i];
for(int i = 1; i < n; i++)
if(a[i] < a[i - 1])
count++;
cout << count << endl;
}
} | 2031A | wrong_submission |
291,622,731 | Java 21 | WRONG_ANSWER on test 2 | import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class round987 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int t = input.nextInt();
while (t -- > 0){
int n = input.nextInt();
int[] arr = new i... | 2031A | wrong_submission |
291,681,503 | C++17 (GCC 7-32) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
typedef long long ll;
#define pb push_back
#define ff first
#define ss second
#define pii pair<int, int>
#define vi vector<int>
#define vll vector<long long>
#define vii vector<pair<int, int>>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int t;
ci... | 2031A | wrong_submission |
291,601,048 | Java 8 | WRONG_ANSWER on test 2 | import java.util.*;
public class assig {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
while(T-->0){
int N = in.nextInt();
int[] h = new int[N];
for (int i = 0; i < h.length; i++) {
h[i]... | 2031A | wrong_submission |
295,739,075 | Java 21 | WRONG_ANSWER on test 2 | /*
वक्रतुण्ड महाकाय सूर्यकोटि समप्रभ।
निर्विघ्नं कुरु मे देव सर्वकार्येषु सर्वदा।
*/
import java.io.BufferedReader;
import java.time.Duration;
import java.time.Instant;
import java.io.IOException;
import java.io.I... | 2031A | wrong_submission |
293,548,172 | Java 21 | WRONG_ANSWER on test 2 | import java.util.Scanner;
public class Solution {
public static void solve(int N, int[] h) {
int count = 0;
for(int i=1;i<h.length;i++){
if(h[i] < h[i-1]) count++;
}
System.out.println(count);
}
public static void main(String[] args) {
Scanner sc = new... | 2031A | wrong_submission |
291,599,053 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll MOD = 1e9 + 7;
ll min(ll a, ll b) {
return a < b ? a : b;
}
ll max(ll a, ll b) {
return a > b ? a : b;
}
void solve() {
ll n ;
cin >> n;
vector<ll> arr(n);
for (auto& i :arr) cin >> i;
ll right = 0;
for (ll i = (n -2) ; i... | 2031A | wrong_submission |
291,614,904 | C++23 (GCC 14-64, msys2) | WRONG_ANSWER on test 2 | #include "bits/stdc++.h"
#define int long long
#define str string
using ld = long double;
using namespace std;
void solve()
{
int n, kol1 = 0, kol2 = 0; cin >> n;
vector<int> a(n);
for(int i = 0; i<n; ++i) cin >> a[i];
for(int i = n-1; i>=0; --i){
if(a[i]!=a[n-1]) break;
else kol1+... | 2031A | wrong_submission |
291,578,779 | C++20 (GCC 13-64) | WRONG_ANSWER on test 2 | #include<bits/stdc++.h>
#define se second
#define fi first
using namespace std;
using pii=pair<int,int>;
using ll=long long;
const int N=1e6+3;
int n,m,K;
int a[N],b[N];
string s,t;
void solve(){
int u,v,w,x,y,z;
cin>>n;int ans=0;
for(int i=1;i<=n;++i)cin>>a[i];
for(int i=2;i<=n;++i){
if(a[i]<a[... | 2031A | wrong_submission |
291,706,161 | Java 21 | WRONG_ANSWER on test 2 | //package codeforcesques;
import java.util.*;
import java.io.*;
public class q1div2987 {
public static void main(String[] args) {
FastReader fs=new FastReader();
int t=fs.nextInt();
while(t-->0)
{
int n=fs.nextInt();
int []arr=fs.readIntArray(n);
... | 2031A | wrong_submission |
300,458,878 | Java 21 | WRONG_ANSWER on test 2 | import java.io.*;
import java.util.*;
public class vlad_sum_sumofdigs {
static class FastScanner {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer("");
String next() {
while (!st.hasMoreTokens()) {
... | 2031A | wrong_submission |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 20