摘要:
对出度为零的点进行拓扑排序 java class Solution { public boolean canReach(int[] arr, int start) { boolean[] vis = new boolean[arr.length]; return dfs(start,arr,vis) 阅读全文
摘要:
"链接" A 简单签到题,直接判断一次去掉两个的花费是不是比一个一次去更贵就可以 菜鸡代码 c++ include using namespace std; define rep(i,j,k) for(int i=(j); i define PLL pair define ini(a,j) mems 阅读全文
摘要:
Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules 阅读全文
摘要:
"链接" include using namespace std; typedef long long ll; int main(int argc, char const argv[]) { int T; ios::sync_with_stdio(false); cin T; while(T ) { 阅读全文
摘要:
"链接" 签到,简单贪心。可以看出来只会使用最多一个7剩下的全是1 include using namespace std; typedef long long ll; char a[100010]; int num[100010]; int main(int argc, char const ar 阅读全文
摘要:
签到,乘以两个相邻的合数 include using namespace std; typedef long long ll; ll A[20010]; ll B[40010]; int main () { ll n,m; cin n m; for(int i = 0; i A[i]; } for( 阅读全文