Codeforces Round #423 (Div. 1, rated, based on VK Cup Finals), problem: (E) Rusty String Solution in C/C++

By |2017-07-24T18:12:27+00:00July 24th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , , , |

#include<bits/stdc++.h> #define pi acos(-1) #define maxn 1148576 using namespace std; typedef long long ll; char s[maxn]; int n; int res[maxn]; struct node{double x,y;}a[maxn],b[maxn],w[2][maxn]; node operator +(node a,node b){return (node){a.x+b.x,a.y+b.y};} node operator -(node a,node b){return (node){a.x-b.x,a.y-b.y};} node operator *(node a,node b){return (node){a.x*b.x-a.y*b.y,a.x*b.y+a.y*b.x};} void init(int k){ [...]