Skip to content

Instantly share code, notes, and snippets.

View behitek's full-sized avatar
😎

Hieu Nguyen Van behitek

😎
View GitHub Profile
@behitek
behitek / overload_operator.cpp
Last active November 7, 2016 13:17
Overload operator = in C++
// http://stackoverflow.com/questions/3933637/why-cannot-a-non-member-function-be-used-for-overloading-the-assignment-operator
#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;
class complex{
protected:
int a,b,i;
float *v;
public:
#include <bits/stdc++.h>
#define _for(i,a,b) for (int i=(a),_b_=(b);i<_b_;i++)
#define _fod(i,a,b) for (int i=(a),_b_=(b);i>_b_;i--)
#define _it(i,v) for (typeof((v).begin()) i = (v).begin(); i != (v).end(); ++i)
#define _all(v) v.begin(), v.end()
#define __(v) memset(v,0,sizeof(v))
using namespace std;
typedef long long LL;
#include<iostream>
#include<cstring>
#include<algorithm>
#include<bits/stdc++.h>
#include<stdio.h>
#include<map>
#include<math.h>
using namespace std;
char s[100001];
@behitek
behitek / 0_ACM_ICPC_Preparation.MD
Last active November 13, 2021 10:11 — forked from ngobach/EPU_Notebook.MD
ACM/ICPC Notebook
@behitek
behitek / getch.cpp
Created November 18, 2016 09:32
getch in c
#include<iostream >
#include<iomanip>
#include<windows.h>
#include<conio.h>
using namespace std;
int main()
{
@behitek
behitek / bigint.c++
Created November 19, 2016 14:28 — forked from zsrinivas/bigint.c++
bigint
const int base = 1000000000; const int base_digits = 9;
struct bigint {
vector<int> a; int sign;
bigint() :
sign(1) {
}
bigint(long long v) {
*this = v;
package learn;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
public class mySqlConnect{
protected Connection con = null;
protected Statement stm = null;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package bookstore.DAL;
import bookstore.Entity.NhaXuatBan;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
#include <stdio.h>
#include <conio.h>
void nhapMang (int a[],int n){
for(int i = 0;i < n;i++){
scanf("%d",&a[i]);
}
}
#include <stdio.h>
#include <string.h>
void nhap(char c[]){
char ch;
int i = 0;
do{
scanf("%c",&ch);
if(ch != 'k'){
c[i] = ch;