Codeforces Round #392 (Div. 2), problem: (C) Unfair Poll Solution in C/C++

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

#include <stdio.h> int n,m,X,Y; long long K; long long ans[110][110]; int main() { int i,j,t; long long mn = 1e18, mx = 0; scanf("%d%d%I64d%d%d",&n,&m,&K,&X,&Y); t = (n > 1 ? (2*n-2)*m : m); for(i=2;i<n;i++) for(j=1;j<=m;j++) ans[i][j] = K/t*2; for(j=1;j<=m;j++) ans[1][j] = ans[n][j] = K/t; [...]