답안 #101618

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
101618 2019-03-19T05:19:59 Z baluteshih 자동 인형 (IOI18_doll) C++14
0 / 100
51 ms 4524 KB
#include "doll.h"
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define pb push_back
#define jizz ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define F first
#define S second
#define ET cout << "\n"
#define MP make_pair
#define MEM(i,j) memset(i,j,sizeof i)
#define ALL(v) v.begin(),v.end()
#define DB(a,s,e) {for(int i=s;i<e;++i) cout << a[i] << " ";ET;}
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;


void create_circuit(int M, std::vector<int> A) {
	vector<int> C,X,Y;
	if(M==1)
	{
		C.pb(1);
		if(A.size()==1) C.pb(0);
		else
		{
			C.pb(-1);
			X.pb(1);
			for(int i=2;i<A.size();++i)
				X.pb(-i+1);
			for(int i=1;i+1<A.size();++i)
				Y.pb(-i-1);
			Y.pb(0);
		}
	}
	answer(C,X,Y);
}

Compilation message

doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:29:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   29 |    for(int i=2;i<A.size();++i)
      |                ~^~~~~~~~~
doll.cpp:31:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   31 |    for(int i=1;i+1<A.size();++i)
      |                ~~~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Wrong Answer: wrong array length
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Wrong Answer: wrong array length
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Wrong Answer: wrong array length
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Wrong Answer: wrong array length
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Incorrect 51 ms 4524 KB over 20000000 inversions
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Incorrect 51 ms 4524 KB over 20000000 inversions
3 Halted 0 ms 0 KB -