Logo 李凌宇的博客

博客

2023-05-21 12:24:37时各种语言使用情况

2023-05-21 12:27:37 By 李凌宇

c++11,共392页

2023-05-21 12:17:36

Java8,共8页

2023-05-21 12:18:14

Pascal,共6页

2023-05-21 12:19:21

C,共26页

2023-05-21 12:20:36

C++,共11956页

2023-05-21 12:21:32

Java11,共2页

2023-05-21 12:22:09

Python2,共58页

2023-05-21 12:23:45

Python3,共102页

2023-05-21 12:24:37

关于我同样的代码提交四次就AC这件事

2023-05-03 16:07:27 By 李凌宇

我同样的代码提交四次就AC了!!!

 #129426    #2520. 买木头    李凌宇    100    103ms    1600kb    C++11    834b    2023-05-03 15:50:09打卡
 #129425    #2520. 买木头    李凌宇    60    103ms    1600kb    C++11    834b    2023-05-03 15:49:44打卡
 #129424    #2520. 买木头    李凌宇    40    6ms    1604kb    C++11    834b    2023-05-03 15:46:17打卡
 #128754    #2520. 买木头    李凌宇    80    113ms    1596kb    C++    834b    2023-04-30 20:39:09打卡

在本地测试:

text1 10 10000 8 20

201

text2 10000 1000000 10000 100

2046

text3 8 50 12 45

9780

text4 9 8 7 6

9271

text5 4 6 2 9

4 6 2 9

我在少儿编程上不对的测试用例说我算出来的全是2:

80分时

input:
4 6 2 9

output:
2
result:
wrong answer 1st words differ - expected: '8570', found: '2'

40分时

input:
10 10000 8 20

output:
8
result:
wrong answer 1st words differ - expected: '201', found: '8'

input:
10000 1000000 10000 100

output:
2
result:
wrong answer 1st words differ - expected: '2046', found: '2'

input:
8 50 12 45

output:
12
result:
wrong answer 1st words differ - expected: '9780', found: '12'

60分时

input:
10 10000 8 20

output:
8
result:
wrong answer 1st words differ - expected: '201', found: '8'

input:
8 50 12 45

output:
12
result:
wrong answer 1st words differ - expected: '9780', found: '12'

而代码都是:

#include<iostream>
using namespace std;
int main() {
    int n,m,l1,s1;
    cin>>n>>m>>l1>>s1;
    int l[n],r[n];
    l[0]=l1;
    r[0]=s1;
    int min1=INT32_MAX,time1,time2;
    for(int i=1;i<n;i++){
        //l_i=((l_(i-1)×37011+10193) mod 10000)+1
        //s_i=((s_(i-1)×73011+24793) mod 100)+1
        l[i]=((l[i-1]*37011+10193)%10000)+1;
        r[i]=((r[i-1]*73011+24793)%100)+1;
        if(l[i]<min1){
            min1=l[i];
        }
    }
    if(l1<min1){
        min1=l1;
    }
    for(int i=0;i<n;i++){
        time1+=l[i]/min1*r[i];
        time2+=l[i]/(min1+1)*r[i];
    }
    if(time1>=m&&time2<m){
        cout<<min1;
        return 0;
    }
    time1=0,time2=0;
    int idx=1;
    while(true){
        for(int i=0;i<n;i++){
            time1+=l[i]/(min1+idx)*r[i];
            time2+=l[i]/(min1+idx+1)*r[i];
        }

        if(time1>=m&&time2<m){
            cout<<min1+idx;
            return 0;
        }
        idx++;
        time1=0,time2=0;
    }
    return 0;
}

请问出什么问题了?

包括别人也出过这样的问题

例:Joker任务调度比赛时0分,比赛完之后在提交100分

请问此问题能改吗?

不懂就问-----Linux中有哪些关键词

2023-05-01 16:36:25 By 李凌宇

寻人启事

2023-04-17 19:17:51 By 李凌宇

谁是鸡蛋鸭蛋萝卜蛋

为啥一题都没AC?

关于我的大号被窃取

2023-04-15 18:29:54 By 李凌宇

我的号被窃取了

有人用我的号发博客,骂我是傻逼

借此我要声明,要是再有这种事件

我就要告老师了

759测试答案对了

2023-04-01 08:53:47 By 李凌宇

759测试答案已更新,请没有100分的同学重新提交

月赛难易程度

2023-03-31 16:22:51 By 李凌宇

请问四月月赛一难吗?

759截止我写这个文章时是不对的(2023年3月25日20点05分)

2023-03-25 20:08:25 By 李凌宇

当前(2023年3月25日20点05分),759的测试用例4和5的答案都是Bad placement.,但,这是不对的。

它们的正确答案应该是There are 134 ships.There are 182 ships.

用例4的输入:

85 37
..............................#......
.....................#...........#..#
.......................#.............
.....................................
.#.....##......................#.....
.#........#........#.........#.......
...................#.................
.............................##......
.......................#.#...........
........#............#...............
..............#...................#..
..........#..........................
.....................................
........#..#.........................
..................#.............#....
...........#.....#...................
........#.....................#...#..
.................#................#..
...........#.......................#.
...................#.................
...........#.........................
...............#.......#.............
..#..................................
......#..............................
.......#.......#.....................
...................#.................
......#...........#...#..............
..#............#....#.#..............
.....#................#.#............
...............##....................
..........................#..........
.....................................
...................#.................
.......#.............................
...................#.................
..............#......#......#.....#..
.......#................#............
.........#............##............#
..........................#.#........
.................................#...
..................#..................
...........#.........................
.....#...............................
...............#.....................
.....................................
............#............#...........
.....................................
.....................#..#............
...#...................#.............
.#............#............#.........
.....#..........#....................
............#........................
.................................#..#
.#...................................
........................#............
.....................................
#........#.....#...................#.
.....................................
#..#.................................
..#.....#.....................#......
...........#.........#...............
#....................................
...#.........................#.......
...............#......#..#...........
................#.........#..........
.....#...#...........................
...##.........#......#........#......
........##..#.......................#
.............#............#..........
..................#..................
...##........#.......................
...........#.............#...#.......
.............................#.......
.....................................
..........................#..........
...................#.................
.....................................
......#.#............................
................#.#..................
..........................##.........
.......#.............................
................#....................
...................................#.
..##.........................#.......
...............##....................

用例5的输入:

85 53
.....#........................#......................
.....#...................#.........................#.
....................................#.......#...#....
#........#......................................#....
.....................................................
...........................#...#.....................
.................#...#......#..................#.....
..............................................#......
................#....................................
......................#.#.........................#..
........#..#......#..................................
..................................#..................
............#................................#.......
.............#....................................#..
.....................................................
.....#..........##...................................
............#............................#...........
.............#...............#.......................
.........##..........................................
......#......#...................#...#.........#.....
.........#..............................#............
..........#.......##.................#...............
.......................................#.......#.....
.............................................#.......
...............................#..#...##.............
..................#............#.........#....#......
.............#.......................................
...............#............#.#..............#.......
................#....................................
..............#................#...................#.
..................#.................#................
...........#......#...#..........#...................
.....................#...........................#...
.....................................................
...#.................#........#......................
..............................................#......
.....................................................
........................................#............
......#.........#....................................
.....................................................
.....................................................
........................................#...#........
..#...............................#...#..............
...................#..........#......................
...................................................#.
.........................#..........#................
..................................#...#..#....#......
............#...............#............#...........
...............#.....................................
.............................................#.......
##.#...............#............#....................
..................#.......#..........................
......................#......#.......................
.......#....................#........................
................................................#....
........#..........................#.................
................##...........#.......................
...................#...........##....................
.................................#.......#...........
.....................#.....#...............#..#..#...
...#...#...........................................#.
.....#............#..................................
.........#..........................#............#...
.....#...#................#..#.......................
.........#...........................#.....##.....#..
#.....#..............................................
..#.........................#...#.............#......
.....................................................
..#.#.....#.....................#...#........#.......
.................#...#...................#.#.........
.....#............#..........................#.......
..............#.................#....................
.......#..#................#.........................
#..........................#............#............
.....#...............................................
.................................#.....#.............
...#.........................#.........#.#...........
......#......#......................#..............#.
..............#.........................#............
.....................................................
...................................#.................
.......#.#................#..........................
............................#........................
.##..#..................................###..........
...........#...........#.#...........................

这两个测试用例,都“不存在两艘船是接触的”,所以,都不应该输出Bad placement.

谢谢老师给的用例。


2023.4.1增加:2023.3.31 23:30:00已更新为正确的测试用例

#5029. 马鞍数 测试用例有误

2022-09-11 16:27:37 By 李凌宇

Test #1: 8 4 10 10 8 10 4 7 15 5 8 6 5 8 6 13 9 11 2 9 1 18 16 15 14 16 15 13 18 15 17 18 6 1

输出应该是 not exit。但,却提示“wrong answer 1st words differ - expected: '7', found: 'not'”

Test #2: 9 7 7 20 17 6 4 7 4 20 19 4 17 15 7 15 5 16 10 3 5 13 5 19 16 14 5 9 3 10 2 16 12 4 17 6 5 18 16 5 9... 该用例无法完整展示,但,大概率,这个答案也是错误的。

By the way,不存在时的输出的英文错了。得是 not exist,不能是 not exit

第6974题有误

2022-07-15 22:16:00 By 李凌宇

6974题有错误。 它的题目描述上写的是先输入n,再输入n个数,题目中的样例数据上也是如此。 可测试用例却是先输入n,再输入n-1个数。 请大家注意,不要踩雷!

共 50 篇博客