Codeforces Round #412 (rated, Div. 2, base on VK Cup 2017 Round 3), problem: (D) Dynamic Problem Scoring Solution In C/C++

By |2017-07-24T02:35:23+00:00July 24th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , , , |

#include<bits/stdc++.h> using namespace std; int a[150][150]; int cnt[10]; int n; int getsc(int id, bool f, int s) { if(a[f][id]==-1) return 0; int sum; if(a[0][id] == -1 || a[1][id] == -1 || a[0][id]<a[1][id]) sum = cnt[id]; else sum = cnt[id]+s; int sc = 500; for(int [...]