小编sky*_*944的帖子

Ideone中的运行时错误,但在代码块中工作正常

我在codeblocks上测试了这段代码并且工作正常但是当我在Ideone上运行时,我在OJ上遇到运行时错误和SIGSEGV错误.我在网上看到SIGSEGV错误是由于内存访问受限造成的.但如果它这样做,为什么不是代码块抱怨......

#include <bits/stdc++.h>
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    int t, i, j, k, x, temp;
    int num1[10000], num2[10000];
    char c;
    bool f = true;
    cin >> t;

    while (t--)
    {
        for (i = 0; i < 10000; i++)
        {
            num1[i] = 0;
            num2[i] = 0;
        }
        i = 0;
        j = 0;
        while (!isspace(c = getchar()))
            num1[i++] = c - '0';
        while (!isspace(c = getchar()))
            num2[j++] = c - '0';
        x = i > j ? i : …
Run Code Online (Sandbox Code Playgroud)

c++ codeblocks

-4
推荐指数
1
解决办法
964
查看次数

标签 统计

c++ ×1

codeblocks ×1