#给牛客的问题反馈和建议# 为什么我在线编程老是莫名其妙编译通不过。我代码没有25行,他也报这个错。我把自己代码删掉,换别人已通过的代码,他还是报这个错,有人解决过这个问题么
./Main.cs(25,36): error CS1502: The best overloaded method match for `Solution.InversePairs(int[])' has some invalid arguments
./solution.cs(4,16): (Location of the symbol related to previous error)
./Main.cs(25,50): error CS1503: Argument `#1' cannot convert `System.Collections.Generic.List<int>' expression to type `int[]'
Compilation failed: 2 error(s), 4 warnings
./Main.cs(25,36): error CS1502: The best overloaded method match for `Solution.InversePairs(int[])' has some invalid arguments
./solution.cs(4,16): (Location of the symbol related to previous error)
./Main.cs(25,50): error CS1503: Argument `#1' cannot convert `System.Collections.Generic.List<int>' expression to type `int[]'
Compilation failed: 2 error(s), 4 warnings
全部评论
我自己捣鼓了好多天整出来了。
1、只有数组相关的题目有这个问题
2、在自测输入的时候,把题目给定的函数参数中的数组改成List<int>类型(假设是int数组)
3、在保存提交的时候再把List<int>改回成数组形式
这真的是搞我心态,开始压根没想到跟他给定的代码有关,幸好跑去力扣上试了下,不然我还老以为自己代码有问题。牛客网客服找不到,群也加不进。希望如果还有人碰到这种问题能早点看到这篇帖子。
许愿笔试过,哈哈哈
相关推荐
10-30 18:20
第一拖拉机制造厂拖拉机学院 C++
牛客41406533...:回答他在课上学,一辈子待在学校的老教授用三十年前的祖传PPT一字一句的讲解,使用谭浩强红皮书作为教材在devc++里面敲出a+++++a的瞬间爆出114514个编译错误来学 点赞 评论 收藏
分享
查看25道真题和解析