题目链接:http://codeforces.com/contest/592/problem/B 题目分类:数学,找规律 题目分析:重要的是画图找规律   代码: #include<bits/stdc++.h> using namespace std; #define LL __int64 int main() { LL n; cin>>n; cout<<(n-)*(n-)<<endl; ; }…
B. The Monster and the Squirrel Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/592/problem/B Description Ari the monster always wakes up very early with the first ray of the sun and the first thing she does is feeding her…
B. The Monster and the Squirrel time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Ari the monster always wakes up very early with the first ray of the sun and the first thing she does is feed…
题目链接:http://codeforces.com/contest/592/problem/B B. The Monster and the Squirrel time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Ari the monster always wakes up very early with the first ra…
B. The Monster and the Squirrel Ari the monster always wakes up very early with the first ray of the sun and the first thing she does is feeding her squirrel. Ari draws a regular convex polygon on the floor and numbers it's vertices 1, 2, -, n in clo…
918C - The Monster 思路1: 右键在新窗口打开图片 代码: #include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mem(a,b) memset(a,b,sizeof(a)) int main(){ ios::sync_with_stdio(false); cin.tie(); string s; cin>>s; ; ;i<…
题目链接: http://codeforces.com/problemset/problem/592/B 这个题目没啥说的,画图找规律吧,哈哈哈 程序代码: #include <cstdio> using namespace std; #define LL long long int main() { LL n; scanf("%lld",&n); printf()*(n-)); ; }…
题目链接:http://codeforces.com/contest/918/problem/C 题目大意:给你一串字符串,其中有'('.')'.'?'三种字符'?'可以当成'('或者')'来用,问该字符串中有多少子串符合括号匹配的规则. 解题思路:根据括号匹配原始版进行改进,设置high和low分别表示未匹配左括号数的上限和下限,当遇到'('时low++,high++,遇到')'时low--,high--,遇到'?'时由于既可以表示'('又可以表示')',所以high++,low--. 原始版…
As Will is stuck in the Upside Down, he can still communicate with his mom, Joyce, through the Christmas lights (he can turn them on and off with his mind). He can't directly tell his mom where he is, because the monster that took him to the Upside D…
链接:传送门 题意:ok 题意略 思路:将问题转化成求 b + a * x = d + c * y,简单拓欧,但是需要注意的是 x >= 0 且 y >= 0 /************************************************************************* > File Name: codeforces787A.cpp > Author: WArobot > Blog: http://www.cnblogs.com/WAro…