Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

### chokudai's blog

By chokudai, history, 3 years ago,

We will hold AtCoder Beginner Contest 197（Sponsored by Panasonic）.

The point values will be 100-200-300-400-500-600.

We are looking forward to your participation!

• +37

| Write comment?
 » 3 years ago, # |   -18 Someone knows good resources for convolution?
 » 3 years ago, # |   0 Can anyone explain how to solve D(The one that involved Geometry)?Link to the Problem
•  » » 3 years ago, # ^ | ← Rev. 2 →   +5 You are supposed to take the first point and rotate it by 180/(n/2) degrees counter-clockwise, around the circle formed by point 1 and point n/2, Center of the circle being mid point between them, radius being the distance between the points/2
 » 3 years ago, # |   0 Can someone provide a test in which this solution fails for D? I've had a really tough time figuring it out (passed 10/18). Thanks. Spoiler#include using namespace std; int main() { int n; cin >> n; long double ang = (n - 2) * 90.0 / n; ang = ang / 360.0 * 2 * M_PI; int x, y, xx, yy; cin >> x >> y >> xx >> yy; long double len = sqrt((xx - x) * (xx - x) + (yy - y) * (yy - y)); long double xr = cos(ang) * len; long double yr = sin(ang) * len; long double ang2 = acos((xx - x) / len); ang2 = (ang2 - ang); cout << setprecision(12) << fixed; cout << (cos(ang2) * xr) + x << ' '; cout << (sin(ang2) * xr) + y << '\n'; return 0; } 
•  » » 3 years ago, # ^ |   0 Does this work? I assume M_PI stands for $\pi$ Spoiler2 0 1 1 0 your code return 1.000000000000 2.000000000000, I feel answer is 0 0
•  » » » 3 years ago, # ^ | ← Rev. 2 →   0 In input it's stated N >= 4, so this shouldn't be an issue. And yes, you're right M_PI is c++ constant for Pi.EDIT: Nvm, I think you meant 4 instead of 2 in your input, I see my code returns the clockwise direction instead of counter-clockwise. Thanks.
 » 3 years ago, # |   0 How to solve E ?
•  » » 3 years ago, # ^ | ← Rev. 2 →   +5 I was filming some training camp footage for some reason, so you might understand my solution as I was speaking some nonsense while implementing it.
 » 3 years ago, # |   +1 Can anyone help me out why my code is Failing for Problem C — ORXOR ll n; ll arr[25]; ll count(ll i, ll ans, ll store) { if(i>n) return ans^store; return min(count(i+1,ans,store|arr[i]),count(i+1,ans^arr[i],0)); } void solve() { cin>>n; for(int i=1; i<=n; ++i) cin>>arr[i]; cout<
•  » » 3 years ago, # ^ |   0 You should change  return min(count(i+1,ans,store|arr[i]),count(i+1,ans^arr[i],0));  into  return min(cnt(i+1,ans,store|arr[i]),cnt(i+1,ans^store,arr[i]));  You can also go to see the official editoral to learn an easier solution.
 » 3 years ago, # |   0 E was a cute task.
•  » » 3 years ago, # ^ |   +9 Your Username precisely says why.
 » 3 years ago, # |   0 Can anyone explain the idea of "build new graph" in problem F?Thanks in advance
 » 3 years ago, # | ← Rev. 2 →   0 How to do problem F? My solution which is quite a mess because maybe I don't understand properly how to construct the graph? I used a map to assign node numbers to the pairs so that its easier to construct the adjacency list. Can someone help me?I am really stuck now :( UPD: IGNORE!! It was a stupid mistake