Tag: problem: (C) Star sky Solve In C/C++

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); } } 📦 Looking for Codeforces Round 427 Div Problem Star? Check...

Want to stay up to date with the latest news?

We would love to hear from you! Please fill in your details and we will stay in touch. It's that simple!