Celebrating Black History Month:...
As February unfolds, so does the annual celebration of...
The Path to Self-Mastery:...
Embarking on a journey of self-mastery and breaking free...
Wizards of Waverly Place...
In a spellbinding announcement, Disney has officially revealed that...
Coachella 2024: Iconic headliners,...
Coachella Valley Music and Arts Festival, one of the...
2024 Taiwan Election: Pivotal...
As Taiwan gears up for its 2024 presidential election,...
Michael Strahan’s Daughter’s Medulloblastoma...
In a recent and heartbreaking revelation, Michael Strahan, former...
Michigan vs. Washington: The...
In a highly anticipated matchup, the 2024 National Championship...
Jason Kelce: Unmasking the...
In the world of professional football, where conformity often...
A Comprehensive Analysis of...
Boeing, a global aerospace giant, has long been a...
Unlocking Full-Stack Mastery: Web...
In the rapidly evolving landscape of technology, the demand...
Advertisement
C/C++
Codeforces Round #385 (Div. 2), problem: (B) Hongcow Solves A Puzzle Solution in C/C++
#include <limits.h>
#include <stdio.h>
int main() {
int i, j, n, m, cnt, imin, jmin,...
C/C++
Codeforces Round #385 (Div. 2), problem: (A) Hongcow Learns the Cyclic Shift Solution in C/C++
#include<stdio.h>
#include<string.h>
void cycle(char s,int len)
{
char temp=s;
int i;
for(i=len-1;i>0;i--)
{
s=s;
}
s=temp;
}
int main(){
char s,orig;
int len,count=0;
scanf("%s",s);
len=strlen(s);
strcpy(orig,s);
do
{
cycle(s,len);
count++;
}
while(strcmp(orig,s));
printf("%dn",count);
return 0;
}
C/C++
Codeforces Round #384 (Div. 2), problem: (E) Vladik and cards Solution in C/C++
#include <stdio.h>
#include <string.h>
#define MIN(X,Y) ((X)<(Y) ? (X) : (Y))
int n,c,r,dp;
int solve(int aver,int...
C/C++
Codeforces Round #384 (Div. 2), problem: (D) Chloe and pleasant prizes Solution in C/C++
#include <stdio.h>
#include <string.h>
#define MAX(X,Y) ((X)>(Y) ? (X) : (Y))
#define INF 1000000000000000
typedef long...
C/C++
Codeforces Round #384 (Div. 2), problem: (C) Vladik and fractions Solution in C/C++
#include<stdio.h>
int main(){
long x;
scanf("%ld",&x);
if(x==1)
printf("-1");
else
printf("%ld %ld %ld",x,x+1,x*(x+1));
return 0;
}
C/C++
Codeforces Round #384 (Div. 2), problem: (B) Chloe and the sequence Solution in C/C++
long long k;
main()
{
scanf("%d%lld",&k,&k);
printf("%dn",1+__builtin_ctzll(k));
}
C/C++
Codeforces Round #384 (Div. 2), problem: (A) Vladik and flights Solution in C/C++
#include<stdio.h>
int main()
{
int i,j,n,a,b;
char s;
scanf("%d%d%d",&n,&a,&b);
scanf("%s",s);
if(s==s)
{
printf("0");
}
else
printf("1");
return 0;
}
C/C++
Codeforces Round #383 (Div. 1), problem: (E) Arpa’s abnormal DNA and Mehrdad’s deep interest Solution in C/C++
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <memory.h>
#include <string.h>
#define rank _ran
using namespace std;
typedef long...
C/C++
Codeforces Round #383 (Div. 1), problem: (D) Arpa’s letter-marked tree and Mehrdad’s Dokhtar-kosh paths Solution in C/C++
#include <bits/stdc++.h>
using namespace std;
#define fo(i,a,b) for(int i=(a);i<(b);i++)
#define MOD 1000000007
#define MP make_pair
#define PB...
C/C++
Codeforces Round #383 (Div. 2), problem: (E) Arpa’s overnight party and Mehrdad’s silent entering Solution in C/C++
#include <stdio.h>
#include <string.h>
int n,a,b,c,p;
void dfs(int k,int col);
int main(void)
{
//freopen("party.in","r",stdin);
...
C/C++
Codeforces Round #383 (Div. 2), problem: (D) Arpa’s weak amphitheater and Mehrdad’s valuable Hoses Solution in C/C++
#include<stdio.h>
int n, m, maxW, p, w, b, prev, next, gb,gw;
int root(int i)
{
...
C/C++
odeforces Round #383 (Div. 2), problem: (C) Arpa’s loud Owf and Mehrdad’s evil plan Solution in C/C++
#include<stdio.h>
int n, c, v;
int gcd(long long a, long long b)
{
...
Wizards of Waverly Place...
In a spellbinding announcement, Disney has officially revealed that...
Coachella 2024: Iconic headliners,...
Coachella Valley Music and Arts Festival, one of the...
2024 Taiwan Election: Pivotal...
As Taiwan gears up for its 2024 presidential election,...
Michael Strahan’s Daughter’s Medulloblastoma...
In a recent and heartbreaking revelation, Michael Strahan, former...
Michigan vs. Washington: The...
In a highly anticipated matchup, the 2024 National Championship...
Jason Kelce: Unmasking the...
In the world of professional football, where conformity often...
A Comprehensive Analysis of...
Boeing, a global aerospace giant, has long been a...
Unlocking Full-Stack Mastery: Web...
In the rapidly evolving landscape of technology, the demand...
Winter Skincare Essentials: Must-Have...
As winter sets in and the temperature drops, it's...
Morning Glow: DIY Beauty...
Unlocking the secret to radiant and glowing skin often...