Submission #587618

# Submission time Handle Problem Language Result Execution time Memory
587618 2022-07-02T07:11:02 Z LastRonin Flights (JOI22_flights) C++17
Compilation error
0 ms 0 KB
#include "Benjamin.h"
#include <string>
#include <vector>
#include <bits/stdc++.h>
#define ll long long
#define pb push_back

using namespace std;

namespace {
	int n, x, y;
}

std::string SendB(int N, int X, int Y) {
	x = X;
	y = Y;
	n = N;
	string a;
	for(int j = 0; j < 14; j++) {
		if((1<<j)&x)a += "1";
		else a += "0";
	}
	for(int j = 0; j < 6; j++)
		if((1<<j)&y) a += "1";		
		else a += "0";
	return a;
}

int Answer(std::string T) {
	assert(0);
	int sub = ((1<<6) - 1)&y;
	ll pos = 0;
	ll answ = 0;				
	for(int j = 0; j < n; j++) {
		if(j&sub) {
			if(j == y) {
				for(int i = pos; i < pos + 14; i++) {
					answ += (T[i] == '1' ? 1 : 0) * (1<<(i - pos));
			   	}
				return answ;
			} else {
				pos += 14;
			}
		}
	}
	assert(0);
	return answ;
}



    

Compilation message

grader_ali.cpp:10:8: warning: '{anonymous}::_randmem' defined but not used [-Wunused-variable]
   10 |   char _randmem[12379];
      |        ^~~~~~~~
/usr/bin/ld: /tmp/cceeUIs4.o: in function `main':
grader_ali.cpp:(.text.startup+0x3bb): undefined reference to `Init(int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
/usr/bin/ld: grader_ali.cpp:(.text.startup+0x569): undefined reference to `SendA(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
collect2: error: ld returned 1 exit status

/usr/bin/ld: /tmp/ccCzpG0L.o: in function `main':
grader_benjamin.cpp:(.text.startup+0x19a): undefined reference to `Answer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/usr/bin/ld: grader_benjamin.cpp:(.text.startup+0x24f): undefined reference to `SendB[abi:cxx11](int, int, int)'
collect2: error: ld returned 1 exit status