Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the registered course list for each student who comes for a query. Input Specification: Each input file…
Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the registered course list for each student who comes for a query. Input Specification: Each input file…
一.技术总结 这里由于复杂度的限制,只能够使用vector,然后进行字符串转化:考虑到string.cin.cout会超时,可以使⽤用hash(262626*10+10)将学⽣生姓名变为int型,然后存储在vector里 这里出了一个巨大的问题,就是审题不清导致最后格式结果不正确. 还有就是空格输出问题,要注意前面是否已经有输出了. 还有就是字符串转化成int存储,hash列表的应用,空间换时间 int getID(char name[]){ int id = 0; for(int i = 0;…
java.io.NotSerializableException: test.io.file.Student at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1183) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347) at test.io.file.Demo4.test2(Demo4.java:36)…