我承认这是我的功课.任务声明说我必须编写一个程序,找到一个图形的拓扑顺序,它将由标准输入输入.然后我需要提交它在教授的服务器上评分.
现在不是算法问题.这更像是一个技术问题.在我的计算机中,我使用.NET编译器(csc),而教授的评分机使用某种形式的单声道.
它运作良好,直到平地机说我得到30/100.我的一个朋友建议我使用评分者的"手动输入系统",所以在这里,我让它为邻接列表创建了100000个数组的列表.
几秒钟后,评分者报告说我的程序崩溃了.
Stacktrace:
at (wrapper managed-to-native) object.__icall_wrapper_mono_object_new_fast (intptr) <0x00004>
at (wrapper managed-to-native) object.__icall_wrapper_mono_object_new_fast (intptr) <0xffffffff>
at System.Exception.ToString () <0x00026>
at (wrapper runtime-invoke) object.runtime_invoke_object__this__ (object,intptr,intptr,intptr) <0xffffffff>
at (wrapper managed-to-native) object.__icall_wrapper_mono_object_new_fast (intptr) <0x00004>
at (wrapper managed-to-native) object.__icall_wrapper_mono_object_new_fast (intptr) <0xffffffff>
at System.Exception.ToString () <0x00026>
at (wrapper runtime-invoke) object.runtime_invoke_object__this__ (object,intptr,intptr,intptr) <0xffffffff>
at (wrapper managed-to-native) object.__icall_wrapper_mono_object_new_fast (intptr) <0x00004>
at (wrapper managed-to-native) object.__icall_wrapper_mono_object_new_fast (intptr) <0xffffffff>
at System.Exception.ToString () <0x00026>
at (wrapper runtime-invoke) object.runtime_invoke_object__this__ (object,intptr,intptr,intptr) <0xffffffff>
at (wrapper managed-to-native) object.__icall_wrapper_mono_object_new_fast (intptr) <0x00004>
at (wrapper managed-to-native) …Run Code Online (Sandbox Code Playgroud)