Beispiel #1
0
int main(int argc, char *argv[])
{
    int num_size = argc - 1;
    int *nums = malloc(sizeof(int) * num_size);

    int i;
    for (i = 1; i < argc; i++)
    {
        nums[i - 1] = atoi(argv[i]);
    }

    if (isSelfCrossing(nums, num_size))
        printf("true\n");
    else
        printf("false\n");
    return 0;
}
Beispiel #2
0
int main() {
    int a[] = {2,1,1,2};
    vector<int> b = arrayToVector(a);
    cout<<isSelfCrossing(b)<<endl;
    return 0;
}