Looking for an inspiration? Below you will find public programs submitted by other users.

Filter by: All Bash C C# C++ 4.9.2 C++14 Haskell Java Java7 Objective-C Pascal (fpc) Pascal (gpc) Perl PHP Python Python 3 Ruby SQL VB.NET Ada Assembler Assembler AWK (gawk) AWK (mawk) bc Brainf**k C++ 4.3.2 C99 strict CLIPS Clojure COBOL COBOL 85 Common Lisp (clisp) D D (dmd) Erlang F# Factor Falcon Forth Fortran Go Groovy Icon Intercal JavaScript (rhino) JavaScript (spidermonkey) Lua Nemerle Nice Nimrod Node.js Ocaml Octave Oz PARI/GP Perl 6 Pike Prolog (gnu) Prolog (swi) Python (Pypy) R Scala Scheme (chicken) Scheme (guile) Smalltalk Tcl Text Unlambda Whitespace

#lmYPUV C++14 16 seconds ago
Compilation error
  1. #include <cstdlib>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. void f(char x[2], int index, char value){
  6. x[index]=value;
  7.  
  8. }
#99weH2 C++14 28 seconds ago
Time limit exceeded
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int t,q;
  5. bool found;
  6. string s;
  7. map<string, int> M;
  8. short int pos[7];//frnt, bak, lft, rigt, top , bottom
  9. cin >> t;
#O9qix2 C++14 2 minutes ago
Success
  1. #include <iostream>
  2. #include <bitset>
  3. using namespace std;
  4.  
  5. int main() {
  6. int a= 234;
  7. string b;
  8. b = bitset<8>(a).to_string();
  9. cout << b;
#ATvDaj C++14 2 minutes ago
Compilation error
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int t,q;
  5. bool found;
  6. map<string, int> M;
  7. short int pos[7];//frnt, bak, lft, rigt, top , bottom
  8. cin >> t;
  9. M["black"]=1;
#4w8JIh C++14 2 minutes ago
Compilation error
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int t,q;
  5. bool found;
  6. map<string, int> M;
  7. short int pos[7];//frnt, bak, lft, rigt, top , bottom
  8. cin >> t;
  9. M["black"]=1;
#ejyIl7 C++14 3 minutes ago
Compilation error
  1. #include <iostream>
  2. #include <bitset>
  3. using namespace std;
  4.  
  5. int main() {
  6. int a= 234;
  7. int b;
  8. b = bitset<8>(a).to_string();
  9. cout << b;
#3agGo6 C++14 1 minute ago
Success
  1. #include<iostream>
  2. #include<algorithm>
  3. #include<vector>
  4. #include<set>
  5. #include<map>
  6. #include<queue>
  7. #include<stack>
  8. #include<iterator>
  9. #include<cmath>
#tAVAKc C++14 4 minutes ago
Compilation error
  1. #include <iostream>
  2. #include <bitset>
  3. using namespace std;
  4.  
  5. int main() {
  6. int a= 234;
  7. b = bitset<8>(a).to_string();
  8. cout << b;
  9. return 0;
#rkQhIq C++14 6 minutes ago
Success
  1. #define _CRT_SECURE_NO_DEPRECATE
  2. //freopen("in.txt", "r", stdin); freopen("out.txt", "w", stdout);
  3. //DEUX_COPY_RIGHTS_RESERVED
  4. #include <stdio.h>
  5. #include <iostream>
  6. #include <algorithm>
  7. #include <string>
  8. #include <cmath>
  9. #include <math.h>
#eB2u0G C++14 7 minutes ago
Compilation error
  1. #include <iostream>
  2. #include <bitset>
  3. using namespace std;
  4. int a=279;
  5. abc = bitset<8>(a).to_string();
  6. cout << abc << endl;
#vHqCgk C++14 8 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a = 3, b = 4;
  6. int* foo = new int[a*b];
  7. return 0;
  8. }
#y9ZlY2 C++14 9 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. typedef int (*function_type)(int, int);
  5.  
  6. void applier(int* array, int size, function_type functor, int parameter)
  7. {
  8. if (array == 0 || size <= 0 || functor == 0) {
  9. return;
#GzFrYB C++14 10 minutes ago
Success
  1. #include<vector>
  2. #include<algorithm>
  3. #include<iostream>
  4. #include<string>
  5. #include<stdio.h>
  6. #include<map>
  7. #include<queue>
  8. using namespace std;
  9. #define mp make_pair
#kyiu49 C++14 9 minutes ago
Success
  1. #include <iostream>
  2. #include<stdio.h>
  3. #include<string>
  4. using namespace std;
  5.  
  6. int main2() {
  7. int d[60] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,1,2,0,1,2,0};
  8. int a[3][3] ={{0,1,2},{1,2,0},{2,0,1}};
  9. char c;
#BXFipB C++14 6 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main (){
  5.  
  6. int x=1;
  7. int y=1;
  8. int c=0;
  9. int result;
#5p0t9R C++14 11 minutes ago
Compilation error
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <vector>
  4. using namespace std;
  5. typedef long long ll;
  6.  
  7.  
  8.  
  9. int n,k,m;
#ejaqzi C++14 11 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int afunc()
  5. {
  6. cout << __FUNCTION__ << endl;
  7. return 1;
  8. }
#ElyDif C++14 12 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. cout<<"Oluseyi Petinrin"<<endl;
  6. return 0;
  7. }
#4CfHgC C++14 14 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. cout<< "Oluseyi Petinrin"<<endl;
  6. return 0;
  7. }
#ipezTA C++14 4 minutes ago
Success
  1. #include<iostream>
  2. #include<algorithm>
  3. #include<vector>
  4. #include<set>
  5. #include<map>
  6. #include<queue>
  7. #include<stack>
  8. #include<iterator>
  9. #include<cmath>
#ClBgbs C++14 16 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. auto ppc = {0, 1, 2, 3};
  6. // your code goes here
  7. return 0;
  8. }
#vbUUfU C++14 1 minute ago
Success
  1. #include <iostream>
  2. #include <type_traits>
  3. #include <string>
  4.  
  5. auto foo(std::nullptr_t) -> void { printf("nil\n"); }
  6. auto foo(bool) -> void { printf("boolean\n"); }
  7. auto foo(std::size_t) -> void { printf("integer\n"); }
  8. auto foo(std::ptrdiff_t) -> void { printf("integer\n"); }
  9. auto foo(double) -> void { printf("number\n"); }
#E3BGuE C++14 15 seconds ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void print(int n)
  5. {
  6. int mask = 1<<30, cnt = 31;
  7. cout<<mask<<" "<<n<<endl;
  8. while(cnt--)
  9. {
#XY12U3 C++14 17 minutes ago
Success
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n;
  8. cin >>n;
  9. int max=0;
#lZADCc C++14 17 minutes ago
Success
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. class Solution {
  6. public:
  7. int minDistance(string word1, string word2) {
  8. int n=word1.length();
  9. int m=word2.length();
#HQQIKL C++14 20 minutes ago
Success
  1. #include<vector>
  2. #include<algorithm>
  3. #include<iostream>
  4. #include<string>
  5. #include<stdio.h>
  6. #include<map>
  7. #include<queue>
  8. using namespace std;
  9. #define mp make_pair
#P1w2VP C++14 20 minutes ago
Success
  1.  
  2. # include <iostream>
  3. # include <math.h>
  4. using namespace std;
  5.  
  6. long long sum=1;
  7. int r=0;
  8.  
  9. void primeFactors(int n)
#18XYHz C++14 12 minutes ago
Success
  1. #include <iostream>
  2. #include <limits>
  3. #include <cmath>
  4.  
  5. void norm(float & score) {
  6. if(score < 0.f || score != score) score = 0.f;
  7. else if(score > 1.f) score = 1.f;
  8. }
#JVOSc3 C++14 23 minutes ago
Compilation error
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. struct ListNode {
  6. int val;
  7. ListNode *next;
  8. ListNode(int x) : val(x), next(NULL) {}
  9. };
#8h5Bc3 C++14 23 minutes ago
Success
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. #define ARRAY_SIZE(arr) sizeof(arr)/sizeof(arr[0])
  5.  
  6. /* just add elements to test */
  7. /* NOTE: A sorted array results in skewed tree */
  8. int ele[] = { 20, 8, 22, 4, 12, 10, 14 };
  9.