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

#RnZY0p C++14 1 minute ago
Time limit exceeded
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int t;
  6. cin>> t;
  7. while(t--){
  8. int n;
  9. int i;
#D9IPri C++14 1 minute ago
Compilation error
  1. #include <iostream>
  2. using namespace std;
  3. typedef struct node{
  4. int data;
  5. node *next;
  6. } node;
  7.  
  8. int main() {
  9. // your code goes here
#DMxy1U C++14 2 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class A {protected: double x,y;
  5. public:virtual void show(){cout << x+y << endl;}
  6. A(double x=1, double y=2){A::x=x;A::y=y;}};
  7.  
  8. class B: public A {protected: int x,y;
  9. public:void show(){cout << x-y << endl;}
#tZvDlI C++14 52 seconds ago
Runtime error
  1. #include <iostream>
  2. #include<math.h>
  3. #include<cstdlib>
  4. using namespace std;
  5. int n,a[100],rmin[100],rmax[100];
  6. int tupple[100];
  7. int check;
  8. void Triangle(int tupple[])
  9. {
#KFGxbX C++14 4 minutes ago
Compilation error
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void Func(int& x, const int& y); // x CAN be changed. y cannot
  5.  
  6.  
  7. int main()
  8. {
  9. int a1 = 5, a2 = 8;
#iiywH7 C++14 6 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a=1,b=36,c=3;
  6. int x;
  7. x=a++-b+--b*c+b;
  8. cout<<x;
  9. // your code goes he
#yjQaV3 C++14 6 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void Func(int& x, const int& y); // x CAN be changed. y cannot
  5.  
  6.  
  7. int main()
  8. {
  9. int a1 = 5, a2 = 8;
#OMXKnX C++14 7 minutes ago
Compilation error
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5. int main()
  6. {
  7. char ans='';
  8. string string_a=NULL;
  9. int size,a_to_z[26],tmp;
#k3LsZ8 C++14 7 minutes ago
Success
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4.  
  5. int fib(int n)
  6. {
  7. if(n<3)
  8. return 1;
  9.  
#R9AtL4 C++14 2 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. enum ETraceReturnValue
  5. {
  6. TRV_NoHit = 0, // Returned when no hits occured in the trace
  7. TRV_Hit = 1, // Returned when we recorded a hit in the trace. Number of hits passed in
  8. // the parameter for traces with multiple results
  9. TRV_ProcessedWhileFetch = 0, // Returned when trace wasn't processed because scene was processing
#HKhfFk C++14 8 minutes ago
Compilation error
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. #include <iostream>
  6. using namespace std;
  7.  
  8. int main() {
  9. int a=1,b=36,c=3;
#cbBYVH C++14 9 minutes ago
Compilation error
  1. #include "stdafx.h"
  2.  
  3. class HTTPContainer{
  4. private:
  5. SOCKET isock;
  6. HTTPHeader header_maker(std::list<string> *list);
  7.  
  8. public:
  9. HTTPContainer(SOCKET sock);
#xrAQuR C++14 9 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. bool ans = true;
  7. ans &= true;
  8. ans &= true;
  9. printf("%d", ans);
#dRcLHX C++14 11 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a=1,b=36,c=3;
  6. int x;
  7. x=a++-b+--b*c;
  8. cout<<x;
  9. // your code goes here
#D3NiqL C++14 11 minutes ago
Success
  1. #include <iostream>
  2. #include <regex>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8.  
  9. std::string sconf = "TEMP_SOURCE=abcd\n INTERVAL=10\n MIN_SPEED=0\n POLICY=60:250 50:0 30:9\n";
#8BMMtw C++14 2 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int x;
  7. while(cin>>x){
  8. if(x>25){
  9. cout<<"Temperature "<<x<<" degree BC bahut garmi hai!\n Cooler is ON\n";
#IaMtNn C++14 8 seconds ago
Compilation error
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int h(){
  5. cout << "Введите два числа: ";
  6. cin >> a >> b;
  7. s=a+b;
  8. cout<<a<<"+"<<b<<"="<<s<<endl;
  9. return 0;
#35l4JO C++14 15 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. unsigned char x = -1;
  7. if(x < 0)
  8. {
  9.  
#bbxpWz C++14 16 minutes ago
Success
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. auto SwapInt = [] (int *x, int *y) {(*x)^=(*y);(*y)^=(*x);(*x)^=(*y); };
  5. int main(){
  6. int a = 1 , b = 2;
  7. cout << a << b << endl;
  8. SwapInt(&a, &b);
  9. cout << a << b << endl;
#tyHtyv C++14 1 second ago
Compilation
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. void f(int x)
  6. {
  7. for(int d=2;d<=x;d++)
  8. {
  9. for(int a=1;a<=(d*d*d);a++)
#HPjcRL C++14 16 minutes ago
Runtime error
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. string isPalindrome(string word,bool print){
  6. print = false;
  7. if(word.length() < 2) {
  8. print = true;
  9. if (print==1)
#H7tdv9 C++14 15 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int k;
  5. int n;
  6. int f,g;
  7. int main() {
  8. cin>>n>>k;
  9. f = n*n*n*n+2*n*n*n+n*n+2*n;
#K2KVwb C++14 1 minute ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. using namespace std;
  6. int array[10]={1,3,5,7,9,11,13,15,17,19};
  7. int m=0;
  8. cin>>m;
  9. int l=1;
#tb9tmI C++14 18 minutes ago
Success
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4.  
  5. int main()
  6. {
  7. const std::vector<std::pair<char, std::string> > html_chars = {
  8. { '&', "&amp;" },
  9. { '"', "&quot;" },
#WRExE0 C++14 12 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template<typename T>
  5. void print(T t)
  6. {
  7. cout << t << endl;
  8. }
#WI4CCF C++14 19 minutes ago
Success
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4.  
  5. int main()
  6. {
  7. const std::vector<std::pair<char, std::string> > html_chars = {
  8. { '"', "&quot;" },
  9. { '&', "&amp;" },
#XzNRKi C++14 19 minutes ago
Success
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4.  
  5. int main()
  6. {
  7. const std::vector<std::pair<char, std::string> > html_chars = {
  8. { '"', "&quot;" },
  9. { '&', "&amp;" },
#2ECILI C++14 19 minutes ago
Compilation error
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4.  
  5. int main()
  6. {
  7. const std::vector<std::pair<char, std::string> > html_chars = {
  8. { '"', "&quot;" },
  9. { '&', "&amp;" },
#CL0HfO C++14 19 minutes ago
Compilation error
  1. #include <iostream>
  2. #include <string>
  3.  
  4. int main()
  5. {
  6. const std::vector<std::pair<char, std::string> > html_chars = {
  7. { '"', "&quot;" },
  8. { '&', "&amp;" },
  9. { '<', "&lt;" },
#JujtOo C++14 18 minutes ago
Success
  1. #include <iostream>
  2.  
  3. struct S1 {
  4. void f() { std::cout << "S1\n"; }
  5. };
  6.  
  7. struct S2 {
  8. void f() { std::cout << "S2\n"; }
  9. void g() {}