摘要: 水~。 const int N=1010; int row[N]; int n; bool check(int x,int y) { for(int i=1;i<y;i++) if(row[i] == x || abs(x-row[i]) == y-i) return false; return t 阅读全文
posted @ 2021-03-05 21:31 Dazzling! 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 水~。 const int N=210; int g[N][N]; int n,m,q; int main() { cin>>n>>m; memset(g,0x3f,sizeof g); while(m--) { int a,b,c; cin>>a>>b>>c; g[a][b]=g[b][a]=c; 阅读全文
posted @ 2021-03-05 18:31 Dazzling! 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 直接暴力枚举。 bool check(int a,int b) { set<int> wolfs; wolfs.insert(a),wolfs.insert(b); int liar_human=0,liar_wolf=0; for(int i=1;i<=n;i++) { int t=state[i 阅读全文
posted @ 2021-03-05 17:58 Dazzling! 阅读(48) 评论(0) 推荐(0) 编辑
摘要: sb题,不想过多描述==。 struct Node { string id; int score; bool operator<(const Node &W) const { if(score != W.score) return score > W.score; return id < W.id; 阅读全文
posted @ 2021-03-05 12:05 Dazzling! 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 水~。 int n,k; bool isprime(int x) { for(int i=2;i*i<=x;i++) if(x % i == 0) return false; return true; } int main() { cin>>n>>k; string s; cin>>s; strin 阅读全文
posted @ 2021-03-05 11:11 Dazzling! 阅读(46) 评论(0) 推荐(0) 编辑
摘要: Qt是什么 Qt 是一个跨平台的 C++ 框架(C++库),目前最新的版本是 Qt5。Qt5 还包含了很多小版本,其中推荐 Qt5.6 或 Qt5.9,这两个版本是 LTS 版本(即长期支持版本),Bug较少,相对稳定。 Qt 除了支持界面设计(GUI编程),还封装了与网络编程、多线程、数据库连接、 阅读全文
posted @ 2021-03-05 11:02 Dazzling! 阅读(246) 评论(0) 推荐(0) 编辑