This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define decode(s,t,u,m,p,e,d) \ | |
m ## s ## u ## t | |
#define begin decode(a,n,i,m,a,t,e) | |
#define execute decode(I, E, L, F, U, C, K) | |
#define encode(b,y,t,e,c,o,d) \ | |
b ## c ## t ## e ## d | |
#define ouput encode(w, a, i, l, h, y, e) | |
#define encrypt encode(f,a,p,e,o,n,n) | |
#include <stdio.h> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int diff(int a,int b) | |
{ | |
int c=a-b; | |
if(c>=0) | |
return c; | |
else | |
return -c; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
employee = {} | |
employee["Name"] = ("Akshay","Anand", "Jha") | |
employee["Address"] = ["36C", "DH Road", "Kolkata"] | |
employee["Contact"] = {"number": "+91-9483873647", "email": "[email protected]"} | |
employee["Job"] = "Developer" | |
employee["Salary"] = 50000 | |
# 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <sstream> | |
using namespace std; | |
#define CITY_ALLOWANCE 5000 | |
#define HILL_ALLOWANCE 3000 | |
#define H_D_ALLOWANCE 2000 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <sstream> | |
using namespace std; | |
#define CITY_ALLOWANCE 5000 | |
#define HILL_ALLOWANCE 3000 | |
#define H_D_ALLOWANCE 2000 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int find(int, int); | |
int main() | |
{ | |
int n, k; | |
scanf("%d %d", &n, &k); | |
int c = find(n,k); | |
printf("%d\n", c); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a=[(2,3), (1,2), (3,1), (1,3), (3,2), (2,4), (4,1)] | |
##answer= [(1,2), (1,3), (1,4), (2,1), (3,2), (3,4), (4,2), (4,3)] | |
b=[(2,3), (1,2)] | |
c=[(1,2),(3,4), (5,6)] | |
def onehop(pairs): | |
res=[] | |
for i in range(len(pairs)): | |
for j in range(len(pairs)): | |
if pairs[i][1]==pairs[j][0] and pairs[i][0]!=pairs[j][1]: | |
res.append((pairs[i][0], pairs[j][1])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int fact(int n) | |
{ | |
if(n<=1) return 1; | |
else return n*fact(n-1); | |
} | |
int main() | |
{ | |
int n; | |
scanf("%d", &n); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define WORD 1 | |
#define PUNC 0 | |
int is_punc(char c) | |
{ | |
if(c==' ' || c==',' || c=='\t' || c==';' || c=='.') | |
return 1; | |
return 0; | |
} | |
int main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdbool.h> | |
#define SIZE 128 | |
#define INF 99999 | |
#define MAX 20 | |
struct link | |
{ |
OlderNewer