Submission #6145941


Source Code Expand

#include<bits/stdc++.h> 
using namespace std;
int a[10000000001];
inline int read(){
    int X=0,w=0; char ch=0;
    while(!isdigit(ch)) {w|=ch=='-';ch=getchar();}
    while(isdigit(ch)) X=(X<<3)+(X<<1)+(ch^48),ch=getchar();
    return w?-X:X;
}
inline void write(int x){
     if(x<0) putchar('-'),x=-x;
     if(x>9) write(x/10);
     putchar(x%10+'0');
}
int main(){
    int n=read(),s=0;
    for(int i=1;i<=n;i++){
        a[i]=i;
        s+=i;
        if(s>n)break;
    }
    int t=s-n;
    for(int i=1;i<=n;i++){
        if(a[i]){
            if(a[i]!=t){write(a[i]);
                printf("\n");
            }
        }
    }
    return 0;
}

Submission Info

Submission Time
Task B - Exactly N points
User luogu_bot2
Language C++ (GCC 5.4.1)
Score 0
Code Size 677 Byte
Status CE

Compile Error

/tmp/ccfzxvxF.o: In function `_GLOBAL__sub_I_a':
Main.cpp:(.text.startup+0x355): relocation truncated to fit: R_X86_64_32 against `.bss'
Main.cpp:(.text.startup+0x364): relocation truncated to fit: R_X86_64_32 against `.bss'
collect2: error: ld returned 1 exit status