随笔分类 -  今朝有酒今朝醉

在我疯狂刷题的路上遇见比较有趣的题目
摘要:#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stddef.h> #include <ctype.h> typedef long long ll; int main() { // please write y 阅读全文
posted @ 2020-05-15 20:48 wusheng_z 阅读(180) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> using namespace std; int XtoDec(string s,int x){///x进制字符串转化为10进制 int ans = 0; for(int i=0;i<s.length();i++){ if(isdigit(s[i]) 阅读全文
posted @ 2020-05-13 09:26 wusheng_z 阅读(290) 评论(0) 推荐(0)
摘要:import java.util.*; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); String str; String[] num = {"零 阅读全文
posted @ 2020-05-12 12:14 wusheng_z 阅读(275) 评论(0) 推荐(0)
摘要:解法:总和为奇数必为false,如果数字的某种组合能够等于 所有数字的总和/2。 #include <bits/stdc++.h> using namespace std; bitset<50005> flag; ///bitset 在 bitset 头文件中, ///是一种类似数组的结构, /// 阅读全文
posted @ 2020-05-03 15:47 wusheng_z 阅读(208) 评论(0) 推荐(0)
摘要:#include<iostream> #include<stdio.h> #include<string.h> using namespace std; typedef long long ll; string now; ll n; int main() { while(~scanf("%lld", 阅读全文
posted @ 2020-05-03 14:25 wusheng_z 阅读(158) 评论(0) 推荐(0)
摘要:#include<stdio.h> #include<math.h> int main(){ long long n,m,i,x,s; int arr[16] = {2,1,2,3,4,5,6,7,8,9,8,7,6,5,4,3}; scanf("%lld",&n); m = sqrt(2*n);/ 阅读全文
posted @ 2020-05-03 11:02 wusheng_z 阅读(181) 评论(0) 推荐(0)
摘要:#include<stdio.h> #include<string.h> int arr[110]; int sum = 0; int dp[201][402]; int num[201]; int main() { int x; char ch; int len=0; while(~scanf(" 阅读全文
posted @ 2020-04-30 22:11 wusheng_z 阅读(141) 评论(0) 推荐(0)
摘要:import java.util.*; public class Main { static int ans; static int num[]; public static void main(String args[]) { Scanner scan = new Scanner(System.i 阅读全文
posted @ 2020-04-30 18:23 wusheng_z 阅读(185) 评论(0) 推荐(0)
摘要:import java.util.*; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); String line; while (scan.hasNe 阅读全文
posted @ 2020-04-30 09:24 wusheng_z 阅读(201) 评论(0) 推荐(0)
摘要:import java.util.*; public class Main { static int dr[]={0,1,0,-1};///向左加,向右减 static int dc[]={1,0,-1,0};///向下加,向上减 static int arr[][]; static int n,m 阅读全文
posted @ 2020-04-29 21:23 wusheng_z 阅读(212) 评论(0) 推荐(0)
摘要:import java.util.*; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); String line; while (scan.hasNe 阅读全文
posted @ 2020-04-29 20:27 wusheng_z 阅读(257) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> using namespace std; int main() { // please write your code here stack<int>st; string str; while(cin>>str){ while(!st.empty() 阅读全文
posted @ 2020-04-29 20:17 wusheng_z 阅读(194) 评论(0) 推荐(0)
摘要:package lianxi; import java.util.*; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); String line; w 阅读全文
posted @ 2020-04-29 18:00 wusheng_z 阅读(202) 评论(0) 推荐(0)
摘要:import java.util.*; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); String line; while (scan.hasNe 阅读全文
posted @ 2020-04-29 16:34 wusheng_z 阅读(247) 评论(0) 推荐(0)
摘要:import java.util.*; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); String line; while (scan.hasNe 阅读全文
posted @ 2020-04-29 09:58 wusheng_z 阅读(160) 评论(0) 推荐(0)
摘要:package lianxi; import java.util.*; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); String line; w 阅读全文
posted @ 2020-04-29 09:29 wusheng_z 阅读(194) 评论(0) 推荐(0)
摘要:import java.util.*; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); String line; while (scan.hasNe 阅读全文
posted @ 2020-04-28 23:46 wusheng_z 阅读(219) 评论(0) 推荐(0)
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 4 int main() 5 { 6 // please write your code here 7 string s1,s2; 8 int arr[26],brr[26]; 9 ios::sy 阅读全文
posted @ 2020-04-28 22:55 wusheng_z 阅读(220) 评论(0) 推荐(0)
摘要:解法:先按一定规则排序(身高从大到小,然后身高相同情况下,人数从小到大),然后移动元素。 1 #include <bits/stdc++.h> 2 3 using namespace std; 4 struct xy{ 5 int x; 6 int y; 7 }; 8 bool cmp(struct 阅读全文
posted @ 2020-04-28 22:54 wusheng_z 阅读(228) 评论(0) 推荐(0)