上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 67 下一页
摘要: 水题~。 int main() { string s; getline(cin,s); for(int i=0;i<s.size();i++) if(s[i] == '6') { int j=i; while(j<s.size() && s[j] == '6') j++; if(j-i > 9) c 阅读全文
posted @ 2021-04-22 17:52 Dazzling! 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 水题。 int h[]={129,130}; int w[]={25,27}; int main() { int T; cin>>T; while(T--) { int sex,height,weight; cin>>sex>>height>>weight; vector<string> res; 阅读全文
posted @ 2021-04-22 14:45 Dazzling! 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 水题~。 const int N=5010,M=10010; string follow[N]; unordered_set<string> S; pair<string,int> name[M]; int n,m; int main() { cin>>n; for(int i=0;i<n;i++) 阅读全文
posted @ 2021-04-22 11:45 Dazzling! 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 合法的出栈序列。 注意和1051 Pop Sequence (25 分)的区别。 上题要求必须出栈元素必须入栈,而本题出栈元素并不是必须入栈。 int n,m,k; int main() { cin>>n>>m>>k; while(k--) { vector<int> a(n); for(int i 阅读全文
posted @ 2021-04-21 23:36 Dazzling! 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 题意巨绕T_T。 $res$是洛希极限和大天体半径的比值,$distdivr$是两天体距离和大天体半径的比值。 分母上都有大天体半径,比较相对大小即可。 double rho; bool type; int distdivr; int main() { cin>>rho>>type>>distdiv 阅读全文
posted @ 2021-04-21 17:54 Dazzling! 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 水题~。 const int N=1010; double a[N]; int n; int main() { cin>>n; double sum=0; for(int i=0;i<n;i++) { cin>>a[i]; sum+=1/a[i]; } printf("%.2f\n",n/sum); 阅读全文
posted @ 2021-04-21 17:42 Dazzling! 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 水题~。 int main() { int a[4],low,maxv=0,range; cin>>a[0]>>a[1]>>a[2]>>a[3]>>low>>range; for(int i=0;i<4;i++) maxv=max(maxv,a[i]); vector<int> res; for(i 阅读全文
posted @ 2021-04-21 17:38 Dazzling! 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 水题~,直接库函数解决。 int n,m; int main() { string line; string s="chi1 huo3 guo1"; int tot=0,cnt=0,ans=0; while(getline(cin,line)) { if(line == ".") break; to 阅读全文
posted @ 2021-04-21 11:29 Dazzling! 阅读(398) 评论(0) 推荐(0) 编辑
摘要: 二进制水题~。 int n,m; int main() { cin>>n>>m; while(m--) { string s; cin>>s; int res=0; for(int i=0;i<s.size();i++) if(s[i] == 'n') res+=1<<(n-1-i); cout<< 阅读全文
posted @ 2021-04-21 11:21 Dazzling! 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 按题意模拟即可。 bool vis[10]; int g[5][5]; int sum[10]; int m; int mp[]={0,0,0,0,0,0,10000,36,720,360,80,252,108,72,54,180,72,180,119,36,306,1080,144,1800,36 阅读全文
posted @ 2021-04-21 11:17 Dazzling! 阅读(189) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 67 下一页