Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 – Elimination Round 3), problem: (F) Santa Clauses and a Soccer Championship Solution in C/C++

By |2017-04-07T22:10:20+00:00January 7th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , , |

Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 - Elimination Round 3), problem: (F) Santa Clauses and a Soccer Championship Solution in C/C++     #include <bits/stdc++.h> using namespace std; vector<int> g[200005], lst[2]; int n, k, c, s[200005], p; bool f[200005]; void [...]

Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 – Elimination Round 3), problem: (E) Santa Claus and Tangerines Solution in C/C++

By |2017-04-07T22:11:44+00:00January 7th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , , |

Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 - Elimination Round 3), problem: (E) Santa Claus and Tangerines Solution in C/C++   #include<stdio.h> typedef long long unsigned llu; typedef unsigned u; u T[1111111],n,s; u G(u y,u x) { if(y<x)return 0; u z,r=1,a=0,b=0; [...]

Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 – Elimination Round 3), problem: (D) Santa Claus and a Palindrome Solution in C/C++

By |2017-04-07T22:11:44+00:00January 7th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , , |

Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 - Elimination Round 3), problem: (D) Santa Claus and a Palindrome Solution in C/C++   #include<stdio.h> #include<stdlib.h> typedef unsigned u; int cmp(const void*x,const void*y){return*(int*)x-*(int*)y;} typedef struct S{int*val;u id,vali,vala;struct S*nx[26];}v; v*alloc() { v*x;u i; x=(v*)malloc(sizeof(v)); [...]

Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 – Elimination Round 3), problem: (C) Santa Claus and Robot Solution in C/C++

By |2017-04-07T22:11:44+00:00January 7th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , , |

Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 - Elimination Round 3), problem: (C) Santa Claus and Robot Solution in C/C++ #include <iostream> using namespace std; int n,s; char a,d,l; int main(){ cin>>n; for(int i=0; i<n; i++){ cin>>a; if((a=='R' && l=='L') || [...]

Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 – Elimination Round 3), problem: (B) Santa Claus and Keyboard Check Solution in C/C++

By |2017-04-07T22:11:44+00:00January 7th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , , |

Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 - Elimination Round 3), problem: (B) Santa Claus and Keyboard Check Solution in C/C++ #include<stdio.h> typedef unsigned u; char M[128],A[1024],B[1024]; int main() { u i=-1,l=0; for(scanf("%s%s",A,B);A[++i];) { if(M[(u)A[i]]&&M[(u)A[i]]!=B[i]) {printf("-1\n");return 0;} if(M[(u)B[i]]&&M[(u)B[i]]!=A[i]) {printf("-1\n");return 0;} if(!M[(u)A[i]]&&B[i]!=A[i])++l; [...]

Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 – Elimination Round 3), problem: (A) Santa Claus and a Place in a Class Solution in C/C++

By |2017-04-07T22:11:44+00:00January 7th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , |

Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 - Elimination Round 3), problem: (A) Santa Claus and a Place in a Class Solution in C/C++   #include<stdio.h> typedef unsigned u; int main() { u n,m,k; scanf("%u%u%u",&n,&m,&k); printf("%u %u %c\n",((k-1)>>1)/m+1,((k-1)>>1)%m+1,k&1?'L':'R'); return 0; } [...]