链接:https://www.nowcoder.com/acm/contest/144/J来源:牛客网 skywalkert, the new legend of Beihang University ACM-ICPC Team, retired this year leaving a group of newbies again. Rumor has it that he left a heritage when he left, and only the one who has at lea…
链接:https://www.nowcoder.com/acm/contest/144/C来源:牛客网 Oak is given N empty and non-repeatable sets which are numbered from 1 to N. Now Oak is going to do N operations. In the i-th operation, he will insert an integer x between 1 and M to every set inde…
链接:https://ac.nowcoder.com/acm/contest/887/H来源:牛客网 题目描述 Given three integers A, B, C. Count the number of pairs <x ,y> (with 1≤x≤Aand1≤y≤B) such that at least one of the following is true: - (x and y) > C - (x xor y) < C ("and", &q…
链接:https://ac.nowcoder.com/acm/contest/884/A来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 524288K,其他语言1048576K 64bit IO Format: %lld 题目描述 A new city has just been built. There're nnn interesting places numbered by positive numbers from 111 to nnn. In order…
链接:https://www.nowcoder.com/acm/contest/143/J 来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 There are n students going to travel. And hotel has two types room:double room and triple room. The price of a double…
考的其实是同构图的性质: 1.同构图的顶点数,边数相等 2.同构图通过点的映射后邻接矩阵相同 这篇博客讲的很好https://www.jianshu.com/p/c33b5d1b4cd9 本题还需要一步构造的方案,通过最基础的n=4和n=4+1的图的图推广到n=4k和n=4k+1的状态 #include<bits/stdc++.h> using namespace std; #define maxn 2005 int mp[maxn][maxn]; int n,f[maxn]; int mai…