Sponsors

CNBC Daily Open: Nvidia...

Nvidia CEO Jensen Huang Dismisses AI 'Bubble' Fears Amid...

How Xiaomi’s AI Efforts...

Xiaomi’s AI Leap: Powering the Next Era of the...

When Gratitude Is Weaponized:...

The Dark Side of Thankfulness: Understanding Weaponized Gratitude Gratitude is...

The Road Wraps Up...

"The Road" Hits a Major Milestone: Wrapping Up the...

A Radical New Kind...

The Tabletop Revolution: Compact Particle Accelerators Poised to Transform...

Why Native American Heritage...

The Profound Significance of Native American Heritage Month in...

Driverless rideshare service Waymo...

Waymo’s Driverless Rideshare Service Headed to San Diego Amid...

Ascot Reports Third Quarter...

Ascot Resources Releases Unaudited Third Quarter 2025 Financial Results VANCOUVER,...

First Ikea, now Costco...

Kiwi Property Group Plays Trump Cards with Costco and...

NBC’s “Today” Show Runs...

NBC's Today Show Under Fire for Credulous "Proof" of...

Will Emmvee Photovoltaic IPO...

Emmvee Photovoltaic IPO: A Bright Outlook for Long-Term Solar...

$200 a week and...

Australia's Cost of Living Crisis Pushes International Students to...

Advertisement

Codeforces Round #421 (Div. 2), problem: (B) Mister B and Angle in Polygon Solution In C/C++

#include <iostream> using namespace std; int main(){ int n,m,q; cin>>n>>m; q=(n*m+90)/180+2; if(q<n){ n=q; } if(n<3){ n=3; } cout<<"2 1 "<<n; return 0; }

Codeforces Round #421 (Div. 2), problem: (A) Mister B and Book Reading Solution In C/C++

#include <iostream> using namespace std; int c,v,vl,l,a; int main(){ cin>>c>>v>>vl>>a>>l; int s=1; for(int i=v;i<c;){ v+=a; if(v>vl) v=vl; i-=l; i+=v; s++;} cout<<s<<endl; }

Codeforces Round #427 (Div. 2), problem: (F) Roads in the Kingdom Solution In C/C++

#include <bits/stdc++.h> using namespace std; int n; int to, pre, cost, last, en; long long wxs; void...

Codeforces Round #427 (Div. 2), problem: (E) The penguin’s game Solution In C/C++

#include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int N=1010; int n,x,y,bit,ans; int cnta,cntb; int a,b; int ans1,ans2; int gao(int *a,int l,int...

Codeforces Round #427 (Div. 2), problem: (D) Palindromic characteristics Solution In C/C++

#include <stdio.h> #include <string.h> #define N 5000 int main() { static char cc; static int dp, kk; int...

Codeforces Round #427 (Div. 2), problem: (C) Star sky Solution In C/C++

#include<iostream> #include<cstdio> using namespace std; int a; int x,y,x1,y1,s; int main() { int n,q,c; int i,j,k; scanf("%d%d%d",&n,&q,&c); for(i=1;i<=n;i++) { scanf("%d%d%d",&x,&y,&s); for(j=0;j<=c;j++) a+=(s+j)%(c+1); } for(i=1;i<=100;i++) for(j=1;j<=100;j++) for(k=0;k<=c;k++) a+=a+a-a; for(i=1;i<=q;i++) { scanf("%d%d%d%d%d",&s,&x,&y,&x1,&y1); s%=(c+1); printf("%dn",a-a-a+a); } }

Codeforces Round #427 (Div. 2), problem: (B) The number on the board Solution In C/C++

#include <stdio.h> int k, c, d, ans; main() { scanf("%d", &k); getchar(); while ((c = getchar() - '0')...

Codeforces Round #427 (Div. 2), problem: (A) Key races Solution in C/C++

#include <cstdio> int s,t1,t2,v1,v2; int main() { scanf("%d%d%d%d%d",&s,&v1,&v2,&t1,&t2); t1=2*t1+s*v1; t2=2*t2+s*v2; puts((t1==t2)?"Friendship":(t1<t2)?"First":"Second"); }

Codeforces Round #426 (Div. 1), problem: (E) Caramel Clouds Solution In C/C++

#include <algorithm> #include <cstdio> #include <cstring> #include <map> #include <set> #include <utility> #include <vector> const int N = 300000; struct...

Codeforces Round #426 (Div. 1), problem: (D) Red-Black Cobweb Solution In C/C++

#include <iostream> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #define maxn 100005 #define mod 1000000007 #define ll long...

Codeforces Round #426 (Div. 2), problem: (E) Ever-Hungry Krakozyabra Solution In C/C++

#include <stdio.h> #include <stdlib.h> #include <string.h> #define N 19 char strL, strR; int l, r, i, n,...

Codeforces Round #426 (Div. 2), problem: (D) The Bakery Solution In C/C++

#include <bits/stdc++.h> #define For(i,a,b) for(long long i=a;i<=b;i++) #define Ford(i,a,b) for(int i=a;i>=b;i--) #define dream_hyojooslh using namespace std; const...

When Gratitude Is Weaponized:...

The Dark Side of Thankfulness: Understanding Weaponized Gratitude Gratitude is...

The Road Wraps Up...

"The Road" Hits a Major Milestone: Wrapping Up the...

A Radical New Kind...

The Tabletop Revolution: Compact Particle Accelerators Poised to Transform...

Why Native American Heritage...

The Profound Significance of Native American Heritage Month in...

Driverless rideshare service Waymo...

Waymo’s Driverless Rideshare Service Headed to San Diego Amid...

Ascot Reports Third Quarter...

Ascot Resources Releases Unaudited Third Quarter 2025 Financial Results VANCOUVER,...

First Ikea, now Costco...

Kiwi Property Group Plays Trump Cards with Costco and...

NBC’s “Today” Show Runs...

NBC's Today Show Under Fire for Credulous "Proof" of...

Will Emmvee Photovoltaic IPO...

Emmvee Photovoltaic IPO: A Bright Outlook for Long-Term Solar...

$200 a week and...

Australia's Cost of Living Crisis Pushes International Students to...

Cornell to pay $60M...

Cornell Pays $60 Million to Settle Trump-Era Research Probes E-Blogarithm...

Squid Game: The Challenge’s...

Contestant 100 Reveals The Truth Behind Her 'Traumatizing Exit'...