标签:++ break turn std scanf http print return href
https://vjudge.net/contest/284040#problem/J
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long ll; ll mapp[40][40]; void init() { for(int i = 0; i < 36; i++) mapp[i][0] = 1; for(int i = 1;i <= 35; i++) for(int j = 1; j <= i; j++) mapp[i][j] = mapp[i - 1][j] + mapp[i][j - 1]; } int n; int main() { init(); int ant = 0; while(~scanf("%d", &n)) { if(n == -1) break; printf("%d %d %lld\n", ++ant, n, 2 * mapp[n][n]); } return 0; }
标签:++ break turn std scanf http print return href
原文地址:https://www.cnblogs.com/downrainsun/p/10403338.html