Skip to content

Instantly share code, notes, and snippets.

import socket
import struct
import sys
import binascii
assert len(sys.argv) ==3
IP = sys.argv[1]
PORT = sys.argv[2]
print "Connecting to",IP, "on port", PORT
#setting sync
#include <string>
#include <algorithm>
#include <vector>
#include <tuple>
#include <iostream>
#include <optional>
void usage(const std::string& progName) {
std::cout << progName << " -X FILE -P FILE -O DIRECTORY " << std::endl
#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
using pii = pair<int, int>;
using l = long;
using ll = long long;
using ull = unsigned long long;
void solve();
#include <algorithm>
#include <array>
#include <cmath>
#include <iostream>
#include <iterator>
#include <limits>
#include <numeric>
#include <unordered_map>
#include <vector>
using namespace std;
//problem 68---
template<class COLLECTION>
bool cmp_arr(const COLLECTION& v1, const COLLECTION& v2) {
for(int i=0; i<v1.size() ; i++) {
if(v1[i]==v2[i])
continue;
if(v1[i]<v2[i])
return true;
else
return false;
#include <bits/stdc++.h>
#include <gmpxx.h>
#include <functional>
#include <numeric>
//TYPEDEFS
typedef unsigned long long ull;
typedef signed long long ll;

Keybase proof

I hereby claim:

  • I am knotman90 on github.
  • I am davidespataro (https://keybase.io/davidespataro) on keybase.
  • I have a public key whose fingerprint is 7D5A 3C6B 50E3 16C3 BAAB 3D12 8069 C984 9E14 40FC

To claim this, I am signing this object:

/**
Author: Davide Spataro
email:[email protected]
www.davidespataro.it
*/
#define DOUBLE_PRECISION (1)
typedef double2 cl_double_complex;
typedef float2 cl_float_complex;
#include <stdio.h>
#include<stdlib.h>
typedef struct node{
int payload;
node* next;
} node;
void print(node* head){
while(head){
printf("%d ",head->payload);