제출 #959467

#제출 시각아이디문제언어결과실행 시간메모리
959467ramalzaherXOR Sum (info1cup17_xorsum)C++14
7 / 100
1679 ms8148 KiB
#include <bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> using namespace std; //typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update > ordered_set ; #define int long long #define F first #define S second #define rep(i , j , n ) for(int i = j ;i < n; i++ ) #define FOR(i , n ) rep(i ,0 , n ) #define sz size() #define pb push_back #define all(x) x.begin() , x.end() #define vi vector<int> #define yes cout<<"YES\n"; #define no cout<<"NO\n"; #define cans cout<<ans<<endl; #define forx(i, x) for(auto &i : x) #define fast #define pii pair<int ,int > #define endl "\n" #define sp ' ' const int N = 300 ; const int inf = 1e15 ; main() { int n ; cin >> n ; int ans = 0 , a[n];forx(it , a )cin >> it ; FOR(i, n ) { rep(j ,i , n ) { ans ^= (a[i]+a[j]) ; } } cout<<ans; }

컴파일 시 표준 에러 (stderr) 메시지

xorsum.cpp:25:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   25 | main()
      | ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...