随笔分类 - C语言
摘要:链接:https://ac.nowcoder.com/acm/contest/308/B来源:牛客网 题解:暴力,具体看代码注释代码#include using namespace std;const int maxn=1e6+5;int p[maxn];int an...
阅读全文
摘要:C. Masha and two friendstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently,...
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/271/B来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 524288K,其他语言1048576K64bit IO Format: %lld官方题解 :根据的定...
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/212/A来源:牛客网 御坂网络时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 131072K,其他语言262144K64bit IO Format: %lld题解:暴力!暴...
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/271/A来源:牛客网 御坂美琴时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 131072K,其他语言262144K64bit IO Format: %lld题解:对每一个数...
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/218/E来源:牛客网 题解:其实就是按照一种规律下去划线就完事了,自己找几张图画一下,不难理解,举例说明n=4;需要注意的是第一步不要斜对角得画,很明显歪着画,能多画一点。一个循环划上面的...
阅读全文
摘要:A题(搜索)#include#include#include#include#include#include#include#include#include#include#define forn(i,a,b) for(int i=a;i= 0)DFS(x-1,y)...
阅读全文
摘要:题解:确定边界条件即可,[1,1000]下标从1到n,0下标记为0,n+1下标记为1001(高手勿喷)。基本条件:比前一个小1且比后一个大1,满足就++,否则中断,重新初始化为0,重新开始。每次操作完更新最大值。 举例说明:1 2 3 4能删3个,1贴左边界,2 3 ...
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/201/L来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 1048576K,其他语言2097152KSpecial Judge, 64bit IO Format:...
阅读全文
摘要:题(水)解(分~):找见第一个满足后一个字母小于前一个字母的情况,删去前一个字母。比如 acb应该删去c(cusing namespace std;int main(){ int n; cin>>n; string str; cin>>str; ...
阅读全文
摘要:传送:B. Divisor Subtractiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are...
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/277/D来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述一棵有点权的有根...
阅读全文

浙公网安备 33010602011771号