Skip to content

Instantly share code, notes, and snippets.

View StarOrpheus's full-sized avatar

Zahar Koval StarOrpheus

  • Limassol, Cyprus
View GitHub Profile
withFile = 0
if(withFile == 1):
fin = open('input.txt', 'r')
fout = open('output.txt', 'w')
def getl():
if(withFile == 0):
return input()
else:
@StarOrpheus
StarOrpheus / main.cpp
Created July 4, 2015 21:56
приколюха
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <cstring>
#include <map>
#include <iomanip>
@StarOrpheus
StarOrpheus / main.cpp
Created July 4, 2015 22:44
Dec to bin
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <cstring>
#include <map>
#include <iomanip>
withFile = 0
if(withFile == 1):
fin = open('input.txt', 'r')
fout = open('output.txt', 'w')
def getl():
if(withFile == 0):
return input()
else:
section .text
global _start
_start:
mov edx,len
mov ecx,msg
mov ebx,1
mov eax,4
int 0x80
BITS 64
section .data
a dd 45
b dd 6
msg1 db 'A is bigger', 0xa
msg2 db 'B is bigger', 0xa
msg3 db 'A == B', 0xa
msg1l equ $-msg1
msg2l equ $-msg2
@StarOrpheus
StarOrpheus / comparator.asm
Created July 7, 2015 20:19
Compare a and b
BITS 64
section .data
a dd -3
b dd -3
msg1 db 'A is bigger', 0xa
msg1l equ $-msg1
msg2 db 'B is bigger', 0xa
msg2l equ $-msg2
msg3 db 'A == B', 0xa
struct a
{
~a()
{
cout << "Kek" << endl;
}
a()
{
delete this;
}
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <stack>
#include <cstring>
#include <map>
#include <iomanip>
#include <queue>
import os
print(os.path.dirname(__file__))