codesolvediscuss | Unsorted

Telegram-канал codesolvediscuss - Codeforces solutions | CodeSolve | discussion

1583

Subscribe to a channel

Codeforces solutions | CodeSolve | discussion

Bhai koi questions bhejdo bs please

Читать полностью…

Codeforces solutions | CodeSolve | discussion

@saurabh phele C to bhej

Читать полностью…

Codeforces solutions | CodeSolve | discussion

#include<bits/stdc++.h>
using namespace std;
#define int long long

int32_t main()
{
    int t;
    cin>>t;
   
    while(t--)
    {
       int n;
       cin>>n;
      
       vector<vector<char>>vec(n,vector<char>(4));
      
       for(int i=0;i<n;i++)
       {
           for(int j=0;j<4;j++)
           {
               cin>>vec[i][j];
           }
       }
      
       vector<int>ans;
      
       for(int i=n-1;i>=0;i--)
       {
           for(int j=0;j<4;j++)
           {
               if(vec[i][j]=='#')
               {
                   ans.push_back(j+1);
               }
           }
       }
      
       for(int i=0;i<ans.size();i++)
       {
           cout<<ans[i]<<" ";
       }
      
       cout<<endl;
    }
   
   
    return 0;
}

// B

Читать полностью…

Codeforces solutions | CodeSolve | discussion

There will be another case also right when minus 1 is done

Читать полностью…

Codeforces solutions | CodeSolve | discussion

Yeh toh question mae bhi diya hai

Читать полностью…

Codeforces solutions | CodeSolve | discussion

I found the max of ceil x and ceil y and multiplied with 2

Читать полностью…

Codeforces solutions | CodeSolve | discussion

lol codeforces is too lag

Читать полностью…

Codeforces solutions | CodeSolve | discussion

BBBB

void test()
{
int n;
cin >> n;

vector<string> v1(n);


for (int i = 0; i < n; ++i) {
cin >> v1[i];
}


for (int i = n - 1; i >= 0; --i) {

for (int j = 0; j < 4; ++j) {
if (v1[i][j] == '#') {

cout << (j + 1) <<" ";
break;
}
}
}

cout<<endl;
}

Читать полностью…

Codeforces solutions | CodeSolve | discussion

codeforces lag too much

Читать полностью…

Codeforces solutions | CodeSolve | discussion

Last div 4 contest my D number code was skipped for copying.. I changed the variabale name name and other format but stll skipped.. Anyone help me.. If I copy code in this group then which item I can change for avoide skipped?

Читать полностью…

Codeforces solutions | CodeSolve | discussion

code work is not working☺️

Читать полностью…

Codeforces solutions | CodeSolve | discussion

Anyone have alt 1400+ on CF? If have please DM me.

Читать полностью…

Codeforces solutions | CodeSolve | discussion

Does anyone has a hack for A or B?

Читать полностью…

Codeforces solutions | CodeSolve | discussion

Fcking losers lmao..cheating karke lund kuch nhi ho rha tumhara...bas shortcut dhundte rahoge bhadwon...mehnat koi nhi karna chahta...

Читать полностью…

Codeforces solutions | CodeSolve | discussion

i can give my code is working

Читать полностью…

Codeforces solutions | CodeSolve | discussion

Questions please send not answers

Читать полностью…

Codeforces solutions | CodeSolve | discussion

C ka logic btao yaar koi

Читать полностью…

Codeforces solutions | CodeSolve | discussion

Are u taking ceil value of x\k

Читать полностью…

Codeforces solutions | CodeSolve | discussion

par isme last tc fail ho ra

Читать полностью…

Codeforces solutions | CodeSolve | discussion

calculate the minimum moves on required, X axis and Y axis, and then sum of total number of most in the maximum of X and Y axis

Читать полностью…

Codeforces solutions | CodeSolve | discussion

i can't even submit my code

Читать полностью…

Codeforces solutions | CodeSolve | discussion

Pleaseeeeeeeeeeeeeee

Читать полностью…

Codeforces solutions | CodeSolve | discussion

#include <iostream>
using namespace std;

int main() {
int t;
cin >> t;

while (t--) {
int a, b;
cin >> a >> b;

int fck = b - a;
cout << fck << endl;
}

return 0;
}

Читать полностью…

Codeforces solutions | CodeSolve | discussion

Join @iscodefun for todays DIV4

Читать полностью…

Codeforces solutions | CodeSolve | discussion

Anyone wants Harkirat Cohort 0-100 at lowest price ? Dm me

Читать полностью…

Codeforces solutions | CodeSolve | discussion

Hi. Today's Div.4 solutions will be available.✅✅✅

Читать полностью…

Codeforces solutions | CodeSolve | discussion

Anyone giving cisco oa??

Читать полностью…

Codeforces solutions | CodeSolve | discussion

#include <bits/stdc++.h>
using namespace std;
int main() {
int test_case;
cin >> test_case;
while(test_case-- > 0) {
int n, q;
cin >> n >> q;
vector<int>a(n);
for(int i = 0;i < n;i++) cin >> a[i];
vector<int>map(n+2);
for(int i = 0;i < n;i++) {
++map[a[i]];
}
vector<int>answer(n+2,-1);
while(q--) {
int x;
cin >> x;
if(answer[x] != -1) {
cout << answer[x] << ' ';
continue;
}
int count = 0;
for(int j = 0;j < x;j++) {
for(int i = j;i <= n;i += x) {
count += map[i];
}
if(count >= n / 2 + 1) {
answer[x] = j;
cout << j << ' ';
break;
}
}
}
cout << endl;
}
}

H solution✅

Читать полностью…

Codeforces solutions | CodeSolve | discussion

itis giving runtime error

Читать полностью…

Codeforces solutions | CodeSolve | discussion

Isn't this will fail in case of a=4 and b=5

Читать полностью…
Subscribe to a channel