第一题:星期计算
public class Main {
public static void main(String[] args) {
System.out.println(7);
}
}
![](https://i-blog.csdnimg.cn/blog_migrate/882086ec4db0d6d7100ff5c6dcc4621c.png)
![](https://i-blog.csdnimg.cn/blog_migrate/adedb2c3133e261dbb4de7947abaf378.png)
第二题:考勤刷卡
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Set;
import java.util.TreeSet;
public class Main {
static Set<Long> st = new TreeSet<>();
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
String[] s;
for(int i = 0; i < n; i++) {
s = br.readLine().split(" ");
st.add(Long.parseLong(s[1]));
}
for(long x: st) {
System.out.println(x);
}
}
}
/*
4
13:05:42 103
14:07:12 4567
15:03:00 103
17:00:21 1
*/
![](https://i-blog.csdnimg.cn/blog_migrate/f334ec5c8ae24328a755fcc031c5ba9d.png)
第三题:卡片
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner s = new Scanner(System.in);
long n = s.nextLong();
long l = 1, r = (long)1e9+10;
while(l < r) {
long mid = (l+r)>>1;
long x = (mid*mid + mid)/2;
if(x >= n) r = mid;
else l = mid+1;
}
System.out.println(r);
}
}
![](https://i-blog.csdnimg.cn/blog_migrate/63e34a496711230b3793e789e1ffccd3.png)
第四题:最大子矩阵
寄寄
![](https://i-blog.csdnimg.cn/blog_migrate/cb71bc3ed82d60fc9d553a2e97b686e9.gif)
每个人其实都差不多,当你明白的时候,你准备好了吗?