After the recent CF round 937 (DIV.4) I solved 5 out 7 problems and upsolved F. I became Specialist after the round.
Wish me luck to become EXPERT soon.
# | User | Rating |
---|---|---|
1 | tourist | 3690 |
2 | jiangly | 3647 |
3 | Benq | 3581 |
4 | orzdevinwang | 3570 |
5 | Geothermal | 3569 |
5 | cnnfls_csy | 3569 |
7 | Radewoosh | 3509 |
8 | ecnerwala | 3486 |
9 | jqdai0815 | 3474 |
10 | gyh20 | 3447 |
# | User | Contrib. |
---|---|---|
1 | maomao90 | 173 |
2 | awoo | 164 |
3 | adamant | 163 |
4 | TheScrasse | 160 |
5 | nor | 157 |
6 | maroonrk | 156 |
7 | -is-this-fft- | 152 |
8 | Petr | 146 |
8 | orz | 146 |
10 | pajenegod | 145 |
After the recent CF round 937 (DIV.4) I solved 5 out 7 problems and upsolved F. I became Specialist after the round.
Wish me luck to become EXPERT soon.
According to Euler's Formula -- Faces + Vertices — Edges = 2
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ff first
#define ss second
void solvr()
{
char a, b;
cin >> a >> b;
ll one, two;
cin >> one >> two;
bool f = false;
bool v = false;
bool e = false;
if(a == 'F')
{
f = true;
}
else if(a == 'V')
{
v = true;
}
else
{
e = true;
}
if(b == 'F')
{
f = true;
}
else if(b == 'V')
{
v = true;
}
else
{
e = true;
}
if(f && v)
{
cout << "E" << endl;
cout << one + two - 2 << endl;
}
else if(f && e)
{
cout << "V" << endl;
if(a == 'E')
{
cout << one + 2 - two << endl;
}
else
{
cout << two + 2 - one << endl;
}
}
else
{
cout << "F" << endl;
if(a == 'E')
{
cout << one + 2 - two << endl;
}
else
{
cout << two + 2 - one << endl;
}
}
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
long long int t = 1;
//cin >> t;
while(t--)
{
solvr();
}
}
n ==> (k-2)(180) / k [Interior angle formula for k-sided regular polygon] kn = 180k — 360 360 = k(180-n) 180-n should be divisible by 360, and k should be greater than 2
Be careful, n equal to 180 will give runtime error if not handled as division by zero is invalid.
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ff first
#define ss second
void solvr()
{
ll n;
cin >> n;
if((180-n) > 0 && 360 % (180-n) == 0 && (360 / (180-n)) > 2)
{
cout << "YES" << endl;
cout << 360 / (180-n) << endl;
}
else
{
cout << "NO" << endl;
}
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
long long int t = 1;
//cin >> t;
while(t--)
{
solvr();
}
}
I have created a contest which would test basic implementation for the new users on codeforces. It will be held on 21/2/2024 at 08:05 AM. The contest would be 1 hour long.It would have three problems, just like DIV 4 A and C The contest would also have editorial with solution codes [IN C++]. Your feedback after the contest is welcome.
Link to the contest — https://codeforces.com/contestInvitation/e27ce19cefc950e3a06cf7416c32b320228f9fe7
UPD — EDITORIAL Published
Hello Codeforces Community, I recently started reading CP-Algorithms site. While doing the practice of binary exponentiation questions, I am stuck at the question:- Chef and Riffles Link:- https://www.codechef.com/JAN221B/problems/RIFFLES
Any help regarding the code explanation, approach would be very helpful.
Thanks!!
Ishat Kumar Jha
Name |
---|