ICode9

精准搜索请尝试: 精确搜索
  • codeforces757F Team Rocket Rises Again【支配树+倍增+拓扑+spfa】2019-06-13 16:00:23

    先跑spfa求出最短路构成的DAG,然后在DAG上跑出支配树dfs出size取max即可 关于支配树,因为是DAG,支配点就是入点在支配树上的lca,所以一边拓扑一边预处理倍增,然后用倍增求lca #include<iostream> #include<cstdio> #include<cstring> #include<queue> #include<vector> using namespace

  • HDU 1702 ACboy needs your help again!(栈和队列的简单应用)2019-05-14 12:50:07

    题目链接:HDU 1702 ACboy needs your help again! 啥错都范,return 0; 忘写了。。。 #include<iostream> #include<cstdio> #include<stack> #include<queue> using namespace std; int main() { int t,n,m; cin>>t; string s,com; queue<int> q

  • $HDU1848\ Fibonacci\ again\ and\ again$ 博弈论2019-05-13 10:54:29

    正解:博弈论 解题报告: 传送门! 首先按照套路显然是考虑先预处理出所有数的$SG$函数值然后全局的$SG$就是$SG(n)$^$SG(m)$^$SG(p)$,这儿应该麻油问题$QwQ$? 然后就考虑怎么求$SG$函数?于是就直接$SG(x)=mex\{SG(x-y),y\in Fib,x\ge y\}$就好鸭$QwQ$ $over$,然后代码也许咕了也许周

  • Fire Again CodeForces - 35C (BFS)2019-04-21 19:39:36

    After a terrifying forest fire in Berland a forest rebirth program was carried out. Due to it N rows with M trees each were planted and the rows were so neat that one could map it on a system of coordinates so that the j-th tree in the i-th row would hav

  • 第一册:lesson seventy one.2019-03-23 13:48:50

    原文: He is awful。 A:What's Ron Marston like , Pauline? B:He is awful.He telephoned me four times yesterday,and three times the day before yesterday. B:He telephoned the office yesterday morning and yesterday afternoon.My boss answered the telephone. A

  • Fibonacci Again2019-03-03 20:01:21

    Problem Description There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2). Input Input consists of a sequence of lines, each containing an integer n. (n < 1,000,000). Output Print the word "yes" if

  • Java编译时错误:A JNI error has occurred, please check your installation and try again2019-02-27 15:51:26

    问题:编译时错误:A JNI error has occurred, please check your installation and try again 分析:重复安装了SDK,电脑中存在不同版本SDK 解决:①命令行中通过“java -version”和“javac -version”查询SDK版本            ②把不需要的版本删除掉(在控制面板卸载)        

  • PAT 甲级 1086 Tree Traversals Again2019-02-12 12:50:55

    https://pintia.cn/problem-sets/994805342720868352/problems/994805380754817024   An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered from 1 to

  • (杭电2053)A + B Again(转换说明符)2019-02-11 22:02:39

    Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 39021 Accepted Submission(s): 15794 Problem Description There must be many A + B problems in our HDOJ , now a new one is coming. Give you two hexadecimal

  • HDU1867 A + B for you again【KMP】2019-02-05 22:50:16

    A + B for you again Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 9765 Accepted Submission(s): 2410 Problem Description Generally speaking, there are a lot of problems about strings processing. Now y

  • [leetcode] remove duplicate letters2019-02-04 23:00:51

    好懒again,草稿 用时4ms,内存1M (好高啊魂淡 class Solution { public: string removeDuplicateLetters(string s) { auto length=s.size(); if (length<=1) return s; int counts[26]={0}; for (int i=0;i<length;i++)

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有