Prompt:
#include<assert.h>
#include<bits/stdc++.h>
// Given a map, return true if all keys are strings in lower
// case or all keys are strings in upper case, else return false.
// The function should return false is the given map is empty.
// Examples:
// >>> check_dict_case((std::map<std::string,std::string>({{"a", "apple"}, {"b", "banana"}})))
// (true)
// >>> check_dict_case((std::map<std::string,std::string>({{"a", "apple"}, {"A", "banana"}, {"B", "banana"}})))
// (false)
// >>> check_dict_case((std::map<std::string,std::string>({{"a", "apple"}, {8, "banana"}, {"a", "apple"}})))
// (false)
// >>> check_dict_case((std::map<std::string,std::string>({{"Name", "John"}, {"Age", "36"}, {"City", "Houston"}})))
// (false)
// >>> check_dict_case((std::map<std::string,std::string>({{"STATE", "NC"}, {"ZIP", "12345"}})))
// (true)
bool check_dict_case(std::map<std::string,std::string> dict) {

}
int main() {
    auto candidate = check_dict_case;
    assert(candidate((std::map<std::string,std::string>({{"p", "pineapple"}, {"b", "banana"}}))) == (true));
    assert(candidate((std::map<std::string,std::string>({{"p", "pineapple"}, {"A", "banana"}, {"B", "banana"}}))) == (false));
    assert(candidate((std::map<std::string,std::string>({{"p", "pineapple"}, {"5", "banana"}, {"a", "apple"}}))) == (false));
    assert(candidate((std::map<std::string,std::string>({{"Name", "John"}, {"Age", "36"}, {"City", "Houston"}}))) == (false));
    assert(candidate((std::map<std::string,std::string>({{"STATE", "NC"}, {"ZIP", "12345"}}))) == (true));
    assert(candidate((std::map<std::string,std::string>({{"fruit", "Orange"}, {"taste", "Sweet"}}))) == (true));
    assert(candidate((std::map<std::string,std::string>())) == (false));
}


Prompt:
#include<assert.h>
#include<bits/stdc++.h>
// Implement a function that takes an non-negative integer and returns a vector of the first n
// integers that are prime numbers and less than n.
// for example:
// >>> count_up_to((5))
// (std::vector<long>({(long)2, (long)3}))
// >>> count_up_to((11))
// (std::vector<long>({(long)2, (long)3, (long)5, (long)7}))
// >>> count_up_to((0))
// (std::vector<long>())
// >>> count_up_to((20))
// (std::vector<long>({(long)2, (long)3, (long)5, (long)7, (long)11, (long)13, (long)17, (long)19}))
// >>> count_up_to((1))
// (std::vector<long>())
// >>> count_up_to((18))
// (std::vector<long>({(long)2, (long)3, (long)5, (long)7, (long)11, (long)13, (long)17}))
std::vector<long> count_up_to(long n) {

}
int main() {
    auto candidate = count_up_to;
    assert(candidate((5)) == (std::vector<long>({(long)2, (long)3})));
    assert(candidate((6)) == (std::vector<long>({(long)2, (long)3, (long)5})));
    assert(candidate((7)) == (std::vector<long>({(long)2, (long)3, (long)5})));
    assert(candidate((10)) == (std::vector<long>({(long)2, (long)3, (long)5, (long)7})));
    assert(candidate((0)) == (std::vector<long>()));
    assert(candidate((22)) == (std::vector<long>({(long)2, (long)3, (long)5, (long)7, (long)11, (long)13, (long)17, (long)19})));
    assert(candidate((1)) == (std::vector<long>()));
    assert(candidate((18)) == (std::vector<long>({(long)2, (long)3, (long)5, (long)7, (long)11, (long)13, (long)17})));
    assert(candidate((47)) == (std::vector<long>({(long)2, (long)3, (long)5, (long)7, (long)11, (long)13, (long)17, (long)19, (long)23, (long)29, (long)31, (long)37, (long)41, (long)43})));
    assert(candidate((101)) == (std::vector<long>({(long)2, (long)3, (long)5, (long)7, (long)11, (long)13, (long)17, (long)19, (long)23, (long)29, (long)31, (long)37, (long)41, (long)43, (long)47, (long)53, (long)59, (long)61, (long)67, (long)71, (long)73, (long)79, (long)83, (long)89, (long)97})));
}


Prompt:
#include<assert.h>
#include<bits/stdc++.h>
// Complete the function that takes two integers and returns
// the product of their unit digits.
// Assume the input is always valid.
// Examples:
// >>> multiply((148), (412))
// (16)
// >>> multiply((19), (28))
// (72)
// >>> multiply((2020), (1851))
// (0)
// >>> multiply((14), (-15))
// (20)
long multiply(long a, long b) {


Prompt:
#include<assert.h>
#include<bits/stdc++.h>
// Given a string s, count the number of uppercase vowels in even indices.
// For example:
// >>> count_upper(("aBCdEf"))
// (1)
// >>> count_upper(("abcdefg"))
// (0)
// >>> count_upper(("dBBE"))
// (0)
long count_upper(std::string s) {

}
int main() {
    auto candidate = count_upper;
    assert(candidate(("aBCdEf")) == (1));
    assert(candidate(("abcdefg")) == (0));
    assert(candidate(("dBBE")) == (0));
    assert(candidate(("B")) == (0));
    assert(candidate(("U")) == (1));
    assert(candidate(("")) == (0));
    assert(candidate(("EEEE")) == (2));
}


Prompt:
#include<assert.h>
#include<bits/stdc++.h>
// Create a function that takes a value (string) representing a number
// and returns the closest integer to it. If the number is equidistant
// from two integers, round it away from zero.
// Examples
// >>> closest_integer(("10"))
// (10)
// >>> closest_integer(("15.3"))
// (15)
// Note:
// Rounding away from zero means that if the given number is equidistant
// from two integers, the one you should return is the one that is the
// farthest from zero. For example closest_integer("14.5") should
// return 15 and closest_integer("-14.5") should return -15.
long closest_integer(std::string value) {

}
int main() {
    auto candidate = closest_integer;
    assert(candidate(("10")) == (10));
    assert(candidate(("14.5")) == (15));
    assert(candidate(("-15.5")) == (-16));
    assert(candidate(("15.3")) == (15));
    assert(candidate(("0")) == (0));
}


Prompt:
#include<assert.h>
#include<bits/stdc++.h>
// From a given vector of integers, generate a vector of rolling maximum element found until given moment
// in the sequence.
// >>> rolling_max((std::vector<long>({(long)1, (long)2, (long)3, (long)2, (long)3, (long)4, (long)2})))
// (std::vector<long>({(long)1, (long)2, (long)3, (long)3, (long)3, (long)4, (long)4}))
std::vector<long> rolling_max(std::vector<long> numbers) {

}
int main() {
    auto candidate = rolling_max;
    assert(candidate((std::vector<long>())) == (std::vector<long>()));
    assert(candidate((std::vector<long>({(long)1, (long)2, (long)3, (long)4}))) == (std::vector<long>({(long)1, (long)2, (long)3, (long)4})));
    assert(candidate((std::vector<long>({(long)4, (long)3, (long)2, (long)1}))) == (std::vector<long>({(long)4, (long)4, (long)4, (long)4})));
    assert(candidate((std::vector<long>({(long)3, (long)2, (long)3, (long)100, (long)3}))) == (std::vector<long>({(long)3, (long)3, (long)3, (long)100, (long)100})));
}