A - Settlers' Training

CodeForces - 63B

题意

给你一串数字,相同的数字为一组,每次可以给一组中的一个数字加一,问这一串数字全变成K需要多少步?

题解

模拟

C++代码

/**
/*@author Victor
/*language C++
*/
//#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<string>
#include<vector>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<cmath>
#include<list>
//#include<map>
#include<set>
//#define DEBUG
#define RI register int
using namespace std;
typedef long long ll;
//typedef __int128 lll;
const int N=+;
const int MOD=1e9+;
const double PI = acos(-1.0);
const double EXP = 1E-;
const int INF = 0x3f3f3f3f;
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pil pair<int , ll>
#define pli pair<ll,int>
#define pdl pair<double,ll>
#define pld pair<ll,double>
#define pdd pair<double,double>
#define iput(n) scanf("%d",&n)
#define iiput(a,n) scanf("%d%d",&a,&n)
#define iiiput(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define dput(n) scanf("%lf",&n)
#define llput(n) scanf("%lld",&n)
#define cput(n) scanf("%s",n)
#define puti(n) printf("%d\n",n)
#define putll(n) printf("%lld\n",n)
#define putd(n) printf("%lfd\n",n)
#define _cls(n) memset(n,0,sizeof(n))
#define __cls(n) memset(n,0x3f,sizeof(n))
#define lc rt << 1
#define rc rt <<1|1
#define debug(x) cout << "[ " << x << " ]" << endl
//priority_queue <int,vector<int>,greater<int> > Q;//优先队列递增
//priority_queue<int>Q;//递减
//map<ll,ll>mp;
//set<ll>st;
//stack<>st;
//queue<>Q;
#define F first
#define S second
#define pb push_back
#define PB push_back
#define MP make_pair
#define ALL(x) begin(x), end(x)
#define SZ(x) (int)(x).size()
/***********************************************/
//加速输入挂
# define IOS ios::sync_with_stdio(false); cin.tie();cout.tie()
# define FOR(i,a,n) for(int i=a; i<=n; ++i)
//求二进制中1的个数
//__builtin_popcount(n);
//求2^k
//#define (ll)Pow(2,k) (1LL<<k)
#define to_1(n) __builtin_popcount(n)
//树状数组
#define lowbit(x) (x&-x)
//#ifdef DEBUG
#define fin freopen("input.in", "r", stdin)
#define fout freopen("output.out", "w", stdout);
//#endif
//手动扩栈
#pragma comment(linker,"/STACK:102400000,102400000")
const int maxn = 2e5 + ;
int n , m ; int a[maxn];
//map<int,int> mp;
int b[maxn];
int main(int argc, char const *argv[])
{
cin >> n >> m; int sum = ;
for(int i = ;i <= n ;i ++) cin >>a[i],sum += a[i];
sort(a + ,a + n + );
int ans = ;
while ( n * m > sum){
ans ++;
int j = ; //b[i] = a[i];
// if(a[i] && j == 0){
// j ++;
// a[i] --;
// sum ++;
// }
// else if(a[i] == n){
// sum ++;
// }
for(int i = ;i <= n ; i++) b[i] = a[i];
if(b[] < m) {
sum ++;
b[]++;
}
for(int i = ;i <= n;i ++){
if(a[i] == a[i-] || a[i] == m) continue;
b[i] ++;
sum ++;
}
sort(b + , b + n + );
for(int i = ;i <= n ;i ++) a[i] = b[i]; } cout << ans << endl;
return ;
}

B - Bulls and Cows

CodeForces - 63C

【题意】

给你一个长度为4的数字序列(每个数字都在0~9之间,且不重复出现)
现在让你猜这个长度为4的序列是什么.
猜了之后对方会告诉有几个数字是位置和数字都正确的(猜的数字序列有顺序)
以及有几个数字是数字出现了但是位置不正确.
即给你两个反馈。
现在给你n个猜的过程(猜的4个数字以及对应的两个反馈)
问你是否能唯一的确定一个4位数字的答案

【题解】

列举出来最后的4位数的所有可能。
对于每一种可能 将其对这n个猜的过程验证一遍》
如果验证通过,那么递增sum
最后如果sum==1则说明存在唯一的一个可能.
sum==0说明没有任何一个可能,则数据有错
sum>1则说明需要更多的数据才能确定是哪一个.

C++代码

/**
/*@author Victor
/*language C++
*/
//#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<string>
#include<vector>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<cmath>
#include<list>
//#include<map>
#include<set>
//#define DEBUG
#define RI register int
using namespace std;
typedef long long ll;
//typedef __int128 lll;
const int N=+;
const int MOD=1e9+;
const double PI = acos(-1.0);
const double EXP = 1E-;
const int INF = 0x3f3f3f3f;
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pil pair<int , ll>
#define pli pair<ll,int>
#define pdl pair<double,ll>
#define pld pair<ll,double>
#define pdd pair<double,double>
#define iput(n) scanf("%d",&n)
#define iiput(a,n) scanf("%d%d",&a,&n)
#define iiiput(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define dput(n) scanf("%lf",&n)
#define llput(n) scanf("%lld",&n)
#define cput(n) scanf("%s",n)
#define puti(n) printf("%d\n",n)
#define putll(n) printf("%lld\n",n)
#define putd(n) printf("%lfd\n",n)
#define _cls(n) memset(n,0,sizeof(n))
#define __cls(n) memset(n,0x3f,sizeof(n))
#define lc rt << 1
#define rc rt <<1|1
#define debug(x) cout << "[ " << x << " ]" << endl
//priority_queue <int,vector<int>,greater<int> > Q;//优先队列递增
//priority_queue<int>Q;//递减
//map<ll,ll>mp;
//set<ll>st;
//stack<>st;
//queue<>Q;
#define F first
#define S second
#define pb push_back
#define PB push_back
#define MP make_pair
#define ALL(x) begin(x), end(x)
#define SZ(x) (int)(x).size()
/***********************************************/
//加速输入挂
# define IOS ios::sync_with_stdio(false); cin.tie();cout.tie()
# define FOR(i,a,n) for(int i=a; i<=n; ++i)
//求二进制中1的个数
//__builtin_popcount(n);
//求2^k
//#define (ll)Pow(2,k) (1LL<<k)
#define to_1(n) __builtin_popcount(n)
//树状数组
#define lowbit(x) (x&-x)
//#ifdef DEBUG
#define fin freopen("input.in", "r", stdin)
#define fout freopen("output.out", "w", stdout);
//#endif
//手动扩栈
#pragma comment(linker,"/STACK:102400000,102400000")
const int maxn = 2e5 + ;
int n , m ; int a[maxn];
//map<int,int> mp;
int b[maxn]; struct node
{
int str;
int a , b;
int f1,f2,f3,f4;
}nod[]; int main(int argc, char const *argv[])
{
int n;
cin >> n;
for(int i = ;i <= n ; i ++){
cin >> nod[i].str >> nod[i].a >> nod[i].b;
}
for(int i = ;i <= n;i ++){ nod[i].f1 = nod[i].str % ;
nod[i].f2 = (nod[i].str / ) % ;
nod[i].f3 = (nod[i].str / ) % ;
nod[i].f4 = (nod[i].str / ) % ; }
int flag = ;
int sum = ;
string str;
for(int i = ;i <= ;i ++){ for(int j = ;j <= ;j ++){ for(int k = ;k <= ;k ++){
for(int p = ;p <= ;p ++){
int ans = ;
if(i != j && i != k && i != p && j != k && j != p && k != p)
for(int q = ;q <= n; q ++){
int a = , b = ;
if(nod[q].f1 == i) {
a ++;
}
if(nod[q].f2 == j) a ++;
if(nod[q].f3 == k)a ++;
if(nod[q].f4 == p) a ++;
if(nod[q].f1 == j || nod[q].f1 ==k || nod[q].f1 == p) b++;
if(nod[q].f2 == i || nod[q].f2 ==k || nod[q].f2 == p) b++;
if(nod[q].f3 == j || nod[q].f3 ==i || nod[q].f3 == p) b++;
if(nod[q].f4 == j || nod[q].f4 ==k || nod[q].f4 == i) b++;
if(a == nod[q].a && b == nod[q].b) ans ++;
}
if(ans == n) {
str.push_back(p + '');
str.push_back(k + '');
str.push_back(j + '');
str.push_back(i + ''); //sum = p * 1000 + k * 100 + j * 10 + i;
flag ++;
// break;
}
}
}
}
}
if(flag == ) cout << str << endl;
else if(flag > )cout << "Need more data" << endl;
else cout << "Incorrect data" << endl;
return ;
}

题意

看这个数的数据类型(都是整树,且为正数)。

解题思路

首先判断长度。 
当长度和极值的长度相同时,在用strcmp判断。

C++代码

/**
/*@author Victor
/*language C++
*/
//#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<string>
#include<vector>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<cmath>
#include<list>
//#include<map>
#include<set>
//#define DEBUG
#define RI register int
using namespace std;
typedef long long ll;
//typedef __int128 lll;
const int N=+;
const int MOD=1e9+;
const double PI = acos(-1.0);
const double EXP = 1E-;
const int INF = 0x3f3f3f3f;
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pil pair<int , ll>
#define pli pair<ll,int>
#define pdl pair<double,ll>
#define pld pair<ll,double>
#define pdd pair<double,double>
#define iput(n) scanf("%d",&n)
#define iiput(a,n) scanf("%d%d",&a,&n)
#define iiiput(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define dput(n) scanf("%lf",&n)
#define llput(n) scanf("%lld",&n)
#define cput(n) scanf("%s",n)
#define puti(n) printf("%d\n",n)
#define putll(n) printf("%lld\n",n)
#define putd(n) printf("%lfd\n",n)
#define _cls(n) memset(n,0,sizeof(n))
#define __cls(n) memset(n,0x3f,sizeof(n))
#define lc rt << 1
#define rc rt <<1|1
#define debug(x) cout << "[ " << x << " ]" << endl
//priority_queue <int,vector<int>,greater<int> > Q;//优先队列递增
//priority_queue<int>Q;//递减
//map<ll,ll>mp;
//set<ll>st;
//stack<>st;
//queue<>Q;
#define F first
#define S second
#define pb push_back
#define PB push_back
#define MP make_pair
#define ALL(x) begin(x), end(x)
#define SZ(x) (int)(x).size()
/***********************************************/
//加速输入挂
# define IOS ios::sync_with_stdio(false); cin.tie();cout.tie()
# define FOR(i,a,n) for(int i=a; i<=n; ++i)
//求二进制中1的个数
//__builtin_popcount(n);
//求2^k
//#define (ll)Pow(2,k) (1LL<<k)
#define to_1(n) __builtin_popcount(n)
//树状数组
#define lowbit(x) (x&-x)
//#ifdef DEBUG
#define fin freopen("input.in", "r", stdin)
#define fout freopen("output.out", "w", stdout);
//#endif
//手动扩栈
#pragma comment(linker,"/STACK:102400000,102400000")
const int maxn = 2e5 + ;
int n , m ; int a[maxn];
//map<int,int> mp;
int b[maxn]; int main()
{
long double n;
cin>>n;
if(n<=)
{
cout<<"byte"<<endl;
}
else if(n<=)
{
cout<<"short"<<endl;
}
else if(n<=)
{
cout<<"int"<<endl;
}
else if(n<=)
{
cout<<"long"<<endl;
}
else
{
cout<<"BigInteger"<<endl;
}
return ;
}

题意

雨可以向两边蔓延,如果往边上走的高度是非递增的。

解题思路

暴力,O(n^2)。

C++代码

/**
/*@author Victor
/*language C++
*/
//#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<string>
#include<vector>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<cmath>
#include<list>
//#include<map>
#include<set>
//#define DEBUG
#define RI register int
using namespace std;
typedef long long ll;
//typedef __int128 lll;
const int N=+;
const int MOD=1e9+;
const double PI = acos(-1.0);
const double EXP = 1E-;
const int INF = 0x3f3f3f3f;
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pil pair<int , ll>
#define pli pair<ll,int>
#define pdl pair<double,ll>
#define pld pair<ll,double>
#define pdd pair<double,double>
#define iput(n) scanf("%d",&n)
#define iiput(a,n) scanf("%d%d",&a,&n)
#define iiiput(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define dput(n) scanf("%lf",&n)
#define llput(n) scanf("%lld",&n)
#define cput(n) scanf("%s",n)
#define puti(n) printf("%d\n",n)
#define putll(n) printf("%lld\n",n)
#define putd(n) printf("%lfd\n",n)
#define _cls(n) memset(n,0,sizeof(n))
#define __cls(n) memset(n,0x3f,sizeof(n))
#define lc rt << 1
#define rc rt <<1|1
#define debug(x) cout << "[ " << x << " ]" << endl
//priority_queue <int,vector<int>,greater<int> > Q;//??????
//priority_queue<int>Q;//??
//map<ll,ll>mp;
//set<ll>st;
//stack<>st;
//queue<>Q;
#define F first
#define S second
#define pb push_back
#define PB push_back
#define MP make_pair
#define ALL(x) begin(x), end(x)
#define SZ(x) (int)(x).size()
/***********************************************/
//?????
# define IOS ios::sync_with_stdio(false); cin.tie();cout.tie()
# define FOR(i,a,n) for(int i=a; i<=n; ++i)
//?????1???
//__builtin_popcount(n);
//?2^k
//#define (ll)Pow(2,k) (1LL<<k)
#define to_1(n) __builtin_popcount(n)
//????
#define lowbit(x) (x&-x)
//#ifdef DEBUG
#define fin freopen("input.in", "r", stdin)
#define fout freopen("output.out", "w", stdout);
//#endif
//????
#pragma comment(linker,"/STACK:102400000,102400000")
const int maxn = 2e5 + ;
int n , m ; int a[maxn];
//map<int,int> mp;
int b[maxn]; int main(int argc, char const *argv[])
{
int n ;
cin >> n ;
for(int i =;i <= n;i ++ ){
cin >> a[i];
}
int ans = ;
for(int i = ;i <= n ;i ++){
int sum = ;
int l = i - , r = i + ;
if(i == )
while(a[r] <= a[r - ] && r != n + ) sum ++,r ++;
else if(i == n)
while(a[l] <= a[l + ] && l != ) sum ++, l --;
else {
while(a[r] <= a[r - ] && r != n + ) sum ++,r ++;
while(a[l] <= a[l + ] && l != ) sum ++,l --;
}
ans = max(ans,sum + );
}
cout << ans << endl;
return ;
}
给若干个文件路径,问子文件夹以及子文件最多为多少 模拟题,可以直接用文件的绝对路径来表示一个文件 

题解

这样就不用担心不同路径文件的重名问题,也不用建树了 
其次子文件夹和子文件数最多的肯定是根目录下的文件夹 
用set维护一下这些文件夹的情况即可,set的好处是不用去重

C++代码

/**
/*@author Victor
/*language C++
*/
//#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<string>
#include<vector>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<cmath>
#include<list>
#include<map>
#include<set>
//#define DEBUG
#define RI register int
using namespace std;
typedef long long ll;
//typedef __int128 lll;
const int N=+;
const int MOD=1e9+;
const double PI = acos(-1.0);
const double EXP = 1E-;
const int INF = 0x3f3f3f3f;
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pil pair<int , ll>
#define pli pair<ll,int>
#define pdl pair<double,ll>
#define pld pair<ll,double>
#define pdd pair<double,double>
#define iput(n) scanf("%d",&n)
#define iiput(a,n) scanf("%d%d",&a,&n)
#define iiiput(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define dput(n) scanf("%lf",&n)
#define llput(n) scanf("%lld",&n)
#define cput(n) scanf("%s",n)
#define puti(n) printf("%d\n",n)
#define putll(n) printf("%lld\n",n)
#define putd(n) printf("%lfd\n",n)
#define _cls(n) memset(n,0,sizeof(n))
#define __cls(n) memset(n,0x3f,sizeof(n))
#define lc rt << 1
#define rc rt <<1|1
#define debug(x) cout << "[ " << x << " ]" << endl
//priority_queue <int,vector<int>,greater<int> > Q;//优先队列递增
//priority_queue<int>Q;//递减
//map<ll,ll>mp;
//set<ll>st;
//stack<>st;
//queue<>Q;
#define F first
#define S second
#define pb push_back
#define PB push_back
#define MP make_pair
#define ALL(x) begin(x), end(x)
#define SZ(x) (int)(x).size()
/***********************************************/
//加速输入挂
# define IOS ios::sync_with_stdio(false); cin.tie();cout.tie()
# define FOR(i,a,n) for(int i=a; i<=n; ++i)
//求二进制中1的个数
//__builtin_popcount(n);
//求2^k
//#define (ll)Pow(2,k) (1LL<<k)
#define to_1(n) __builtin_popcount(n)
//树状数组
#define lowbit(x) (x&-x)
//#ifdef DEBUG
#define fin freopen("input.in", "r", stdin)
#define fout freopen("output.out", "w", stdout);
//#endif
//手动扩栈
#pragma comment(linker,"/STACK:102400000,102400000")
const int maxn = 2e5 + ;
int n , m ; int a[maxn];
//map<int,int> mp;
int b[maxn]; map<string,set<string> > folder,files; int main(int argc, char const *argv[])
{
string str , rt;
while(cin >> str){
int ans = ;
for(int i = ; i < str.size() ; i ++){
if(str[i] == '\\'){
ans ++;
if(ans == ){
rt = str.substr(,i);
}
else if(ans > ) folder[rt].insert(str.substr(,i));
} }
files[rt].insert(str);
}
int maxx1 = ,maxx2 = ;
for(auto au : folder){
maxx1 = max(maxx1,(int)au.second.size());
}
for(auto au : files){
maxx2 = max(maxx2,(int)au.second.size());
} cout << maxx1 << " " << maxx2 << endl; return ;
}

题解

要求构造一个长度为n的正整数序列ai,使得对于∀i≠j,gcd(ai,aj)>1,且gcd(a1,a2,...,an)=1
n=2显然无解,n>2时,取前nn个素数p1,p2,...,pn令ai=∏j≠ipj,简单验证知a1,a2,...,an满足条件,数字很大要用到高精度

解法二

构造出前3个15 10 6 剩下的为 i * 6即可

C++代码一

/**
/*@author Victor
/*language C++
*/
//#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<string>
#include<vector>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<cmath>
#include<list>
#include<map>
#include<set>
//#define DEBUG
#define RI register int
using namespace std;
typedef long long ll;
//typedef __int128 lll;
const int N=+;
const int MOD=1e9+;
const double PI = acos(-1.0);
const double EXP = 1E-;
const int INF = 0x3f3f3f3f;
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pil pair<int , ll>
#define pli pair<ll,int>
#define pdl pair<double,ll>
#define pld pair<ll,double>
#define pdd pair<double,double>
#define iput(n) scanf("%d",&n)
#define iiput(a,n) scanf("%d%d",&a,&n)
#define iiiput(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define dput(n) scanf("%lf",&n)
#define llput(n) scanf("%lld",&n)
#define cput(n) scanf("%s",n)
#define puti(n) printf("%d\n",n)
#define putll(n) printf("%lld\n",n)
#define putd(n) printf("%lfd\n",n)
#define _cls(n) memset(n,0,sizeof(n))
#define __cls(n) memset(n,0x3f,sizeof(n))
#define lc rt << 1
#define rc rt <<1|1
#define debug(x) cout << "[ " << x << " ]" << endl
//priority_queue <int,vector<int>,greater<int> > Q;//优先队列递增
//priority_queue<int>Q;//递减
//map<ll,ll>mp;
//set<ll>st;
//stack<>st;
//queue<>Q;
#define F first
#define S second
#define pb push_back
#define PB push_back
#define MP make_pair
#define ALL(x) begin(x), end(x)
#define SZ(x) (int)(x).size()
/***********************************************/
//加速输入挂
# define IOS ios::sync_with_stdio(false); cin.tie();cout.tie()
# define FOR(i,a,n) for(int i=a; i<=n; ++i)
//求二进制中1的个数
//__builtin_popcount(n);
//求2^k
//#define (ll)Pow(2,k) (1LL<<k)
#define to_1(n) __builtin_popcount(n)
//树状数组
#define lowbit(x) (x&-x)
//#ifdef DEBUG
#define fin freopen("input.in", "r", stdin)
#define fout freopen("output.out", "w", stdout);
//#endif
//手动扩栈
#pragma comment(linker,"/STACK:102400000,102400000")
const int maxn = 2e5 + ;
int n , m ; int a[maxn];
//map<int,int> mp;
int b[maxn];
int cnt,prime[N],p[N];
void isprime()
{
cnt = ;
memset(prime,true,sizeof(prime));
for(int i=; i<N; i++)
{
if(prime[i])
{
p[cnt++] = i;
for(int j=i+i; j<N; j+=i)
prime[j] = false;
}
}
}
long long sum[];
int main(int argc, char const *argv[])
{
int n ;
isprime();
cin >> n ;
int flag = ;
if(n == )flag = ;
sum[] = ;
for(int i = ;i <= ; i++){
sum[i] = p[i-];
}
if(flag){
cout << << endl << << endl << << endl;
for(int i = ;i <= n; i ++) cout << i * << endl;
} else
cout << - << endl; return ;
}

java代码二

 //package ce;

import java.lang.invoke.ConstantCallSite;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Scanner; import javax.swing.InputMap;
import javax.swing.undo.AbstractUndoableEdit; public class Main{ static int maxn = (int) (1e5 + );
static int p[] = new int [maxn];
static int prime[] = new int [maxn];
static void isprime()
{
//int b[] = new int[maxn];
int cnt; // p[] = new int [maxn];
cnt = ;
Arrays.fill(prime,);
for(int i=; i< maxn; i++)
{
if(prime[i] == )
{
p[cnt++] = i;
for(int j=i+i; j<maxn; j+=i)
prime[j] = ;
}
}
} private Object sizeof(int[] prime) {
// TODO Auto-generated method stub
return null;
}
static BigInteger sum[] = new BigInteger[];
public static void main(String[] args) { // int n ;
isprime();
Scanner a = new Scanner(System.in);
int n = a.nextInt();
int flag = ;
if(n == )flag = ;
//sum[0] = 1;
for(int i = ;i <= ; i++){
// Object[] p;
sum[i] = BigInteger.valueOf(p[i-]);
}
if(flag == )
for(int i = ;i <= n ;i ++){
BigInteger ans = BigInteger.valueOf();
for(int j = ;j <= n;j ++){
if(i!=j) ans = ans.multiply(sum[j]);
}
if (flag == ) {
System.out.println(ans);
} }else System.out.print(-); }
}

CSUST 8.3 早训的更多相关文章

  1. CSUST 8.4 早训

    ## Problem A A - Memory and Crow CodeForces - 712A 题意: 分析可得bi=ai+ai+1 题解: 分析可得bi=ai+ai+1 C++版本一 #inc ...

  2. CSUST 8.5 早训

    ## Problem A A - Meeting of Old Friends CodeForces - 714A 题意: 解题说明:此题其实是求两段区间的交集,注意要去除掉交集中的某个点. 题解: ...

  3. B - Planning 早训 贪心

    B - Planning 这个题目我知道要贪心,也知道怎么贪,但是写不出来,感觉自己好菜. 这个题目要用优先队列维护. 题目大意是飞机延误,不同的飞机每次延误一分钟,它的代价不同,然后问,怎么安排才能 ...

  4. 获取技能的成功经验和关于C语言学习的调查 2015528

    内容提要 你有什么技能比大多人(超过90%以上)更好?针对这个技能的获取你有什么成功的经验?与老师博客中的学习经验有什么共通之处? 有关C语言学习的调查 你是怎么学习C语言的?(作业,实验,教材,其他 ...

  5. 20155228 获取技能的成功经验和关于C语言学习的调查

    内容提要 你有什么技能比大多人(超过90%以上)更好?针对这个技能的获取你有什么成功的经验?与老师博客中的学习经验有什么共通之处? 有关C语言学习的调查 你是怎么学习C语言的?(作业,实验,教材,其他 ...

  6. 吐泡泡(2018年全国多校算法寒假训练营练习比赛(第二场)+栈模拟)+Plug-in(codeforces81A+栈模拟)

    吐泡泡题目链接:https://www.nowcoder.com/acm/contest/74/A 题目: 思路: 这种题目当初卡了我很久,今天早训时遇到一个一样得题,一眼就想到用栈模拟,就又回来把这 ...

  7. B - Save the problem! CodeForces - 867B 构造题

    B - Save the problem! CodeForces - 867B 这个题目还是很简单的,很明显是一个构造题,但是早训的时候脑子有点糊涂,想到了用1 2 来构造, 但是去算这个数的时候算错 ...

  8. C - Ordering Pizza CodeForces - 867C 贪心 经典

    C - Ordering Pizza CodeForces - 867C C - Ordering Pizza 这个是最难的,一个贪心,很经典,但是我不会,早训结束看了题解才知道怎么贪心的. 这个是先 ...

  9. C. Journey bfs 拓扑排序+dp

    C. Journey 补今天早训 这个是一个dp,开始我以为是一个图论,然后就写了一个dij和网络流,然后mle了,不过我觉得如果空间开的足够的,应该也是可以过的. 然后看了题解说是一个dp,这个dp ...

随机推荐

  1. Linux基础教程 linux中使用find命令搜索文件常用方法记录

    find是linux非常强大的搜索命令,通过man find查看find手册,可以发现find的说明一屏接一屏,估计要看完也得花不少时间.兄弟连Linux培训 小编总结了下,整理出find常用的使用方 ...

  2. python Tkinter 组件

    Tkinter的提供各种控件,如按钮,标签和文本框,一个GUI应用程序中使用.这些控件通常被称为控件或者部件. 目前有15种Tkinter的部件.我们提出这些部件以及一个简短的介绍,在下面的表: 控件 ...

  3. 牛客网 TaoTao要吃鸡 ( 0/1背包变形 )

    题意 : 题目链接 分析 :  如果没有 BUG (即 h == 0 的时候)就是一个普通的 0 / 1 背包 需要讨论一下 h != 0 的情况 此时有就相当于有物品是有特权的 而且背包装有特权的物 ...

  4. JUnit——单元测试

    写了个类,要给别人用,会不会有bug?怎么办?测试一下. JUnit可以测试JDBC.Servelet.Struts.Spring.Hibernate等等. 单元测试是开发人员的工作,测试人员负责测试 ...

  5. 病毒 x

    04:病毒 查看 提交 统计 提问 总时间限制:  1000ms 内存限制:  65535kB 描述 有一天,小y突然发现自己的计算机感染了一种病毒!还好,小y发现这种病毒很弱,只是会把文档中的所有字 ...

  6. windows 全局安装 express 但无法命令行执行

    从 express 的官网直接按照命令行全局安装 express 后, express 命令无法执行, 在 cmd 中显示 该命令行无法识别.基本可判断是 环境变量配置 这边没有搞定. 1. 卸载 n ...

  7. linq/EF 使用技巧笔记

    先上图 1.linq列转行(如图从上到下,action_type即power字段),其实严格意义上来说,并不是linq,只是用了循环 List<NavigationDto> leaf = ...

  8. jenkins 管理员密码重置

    jenkins管理员 admin的密码忘记怎么重置呢? 修改admin的加密密码为123456的加密密码 #jbcrypt:$2a$10$MiIVR0rr/UhQBqT.bBq0QehTiQVqgNp ...

  9. 源码阅读-SwiftyJSON

    最后更新:2018-03-19 一.说在前面的话: SwiftyJSON 作为一个 swift 的解析库, 在 Swift4 之前备受欢迎, 目前(2018.3.19) 已经有 1.6w+ Star ...

  10. 实验报告三&&第五周总结

    1.已知字符串:"this is a test of java".按要求执行以下操作:(要求源代码.结果截图.) ① 统计该字符串中字母s出现的次数. ② 统计该字符串中子串“is ...