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

#A6zWjs C++14 1 minute ago
Success
  1. #include <iostream>
  2. #include <sstream>
  3. using namespace std;
  4.  
  5. int main() {
  6. ostringstream foo;
  7. foo << 12*23;
  8. cout << foo.str() << endl;
  9. return 0;
#r2zeXf C++14 1 minute ago
Compilation error
  1. include "stdafx.h"
  2. #include <iostream>
  3. #include <math.h>
  4. using namespace std;
  5. double a[4][4]={{17, 1, 12, 0},
  6. {10, 19, 3, 1},
  7. {-1, -3, 21, 1},
  8. {1, 3, 5, 13}};
  9. double b[4]={1, 17, 13, 10};
#xgPcfU C++14 11 seconds ago
Compilation
  1. #include <vector>
  2. #include <algorithm>
  3. #include <stdio.h>
  4. #include <iostream>
  5. using namespace std;
  6.  
  7. int main() {
  8. int n,m,i,j,min= 2147483647;
  9. scanf("%i %i",&n,&m);
#lCaio9 C++14 34 seconds ago
Success
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4. int n,m;
  5. char Board[102][102];
  6. int visited[102][102];
  7. int di[]={-1,0,1,0};
  8. int dj[]={0,1,0,-1};
  9. void dfs(int i,int j)
#eDvQ9Y C++14 3 minutes ago
Success
  1. #include <iostream>
  2. #include <string>
  3.  
  4. bool contains( const std::string& haystack, const std::string& needle ) {
  5. auto pos = haystack.find( needle );
  6.  
  7. if( pos == haystack.npos ) {
  8. return false;
  9. }
#fuIw6t C++14 4 minutes ago
Compilation error
  1. #include <iostream>
  2. #include <string>
  3.  
  4. #include "Stack.h"
  5.  
  6. int main ()
  7. {
  8. string str = "10-11*5+4/2";
  9.  
#4f8HzN C++14 2 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. short int grop[23];
  5.  
  6. int main() {
  7. for(int i=0; i<=sizeof(grop)/2+1; ++i)
  8. cin >> grop[i];
  9.  
#lrI18J C++14 9 minutes ago
Runtime error
  1. /* assert example */
  2. #include <stdio.h> /* printf */
  3. #include <assert.h> /* assert */
  4.  
  5. void print_number(int* myInt) {
  6. assert (myInt!=NULL);
  7. printf ("%d\n",*myInt);
  8. }
#UlI1Jb C++14 8 minutes ago
Success
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. void fun(const int &i)
  5. {
  6. cout << "fun(const int &) called ";
  7. }
  8. void fun(int &i)
  9. {
#DnWZ0L C++14 9 minutes ago
Success
  1. #include<iostream>
  2. #include <fstream>
  3. using namespace std;
  4.  
  5. int main(){
  6.  
  7. ifstream fin("file_A.txt");
  8.  
  9. if(!fin){ cout << "讀檔失敗" << endl; } // 檢查讀檔成功與否
#U0EciN C++14 8 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int n = -3;
  7.  
  8. n >>= 3;
  9. cout << n << endl;
#fixuk6 C++14 13 minutes ago
Compilation error
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <conio.h>
  4.  
  5.  
  6. int main()
  7. {
  8.  
  9. printf("Enter size matrix: ");
#Ea1bxB C++14 13 minutes ago
Compilation error
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <conio.h>
  4.  
  5.  
  6. int main()
  7. {
  8.  
  9. printf("Enter size matrix: ");
#aAE3qt C++14 2 minutes ago
Runtime error
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int min(int a, int b)
  5. {
  6. return (a < b) ? a : b;
  7. }
  8. int x(int n, int m)
  9. {
#BdSkBo C++14 17 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. return 0;
  7. }
#PH0gI1 C++14 16 minutes ago
Compilation error
  1.  
  2.  
  3.  
  4. class A
  5. {public:
  6. A(int x, float y=0){}
  7. A(int x , char y){}
  8.  
  9. };
#mU2LV4 C++14 18 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b;
  6. cin >> a >> b;
  7. cout << a+b << endl;
  8. return 0;
  9. }
#n6NLLm C++14 19 minutes ago
Success
  1. #include <iostream>
  2.  
  3. class Foo {
  4. public:
  5. static constexpr const int Read{1};
  6. static constexpr const int Write{2};
  7. };
  8.  
  9. int main() {
#d6m1pD C++14 11 minutes ago
Success
  1. #include <cstdlib>
  2. #include <cmath>
  3. #include <vector>
  4. #include <iostream>
  5. using namespace std;
  6.  
  7. int seqToIndex(vector<double>::iterator it, int r, int d)
  8. {
  9. int index = 0;
#yVUFrb C++14 20 minutes ago
Success
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b;
  6. cout << a << b;
  7. return 0;
  8. }
#mytfgS C++14 17 minutes ago
Success
  1. #include <iostream>
  2. #include <string>
  3. #include <cstring>
  4. using namespace std;
  5.  
  6. int main() {
  7.  
  8. char *p = "TEST";
  9. string test = "test";
#x97ZFQ C++14 22 minutes ago
Success
  1. #include<iostream>
  2. #include <algorithm>
  3. using namespace std;
  4. int main(){
  5. freopen("in.txt","r",stdin);
  6. freopen("out.txt","w",stdout);
  7. long n,k,x,i,negative; long long result;
  8. while(cin>>n>>k){
  9. long ar[100000];
#xjXu7k C++14 23 minutes ago
Compilation error
  1. #include<iostream>
  2. #include <algorithm>
  3. using namespace std;
  4. long main(){
  5. long n,k,x,i,negative; long long result;
  6. while(cin>>n>>k){
  7. long ar[100000];
  8. negative=0;
  9. for (i = 0; i <n; i++)
#J3FQsL C++14 23 minutes ago
Compilation error
  1. #include <cstdlib>
  2. #include <cmath>
  3. #include <vector>
  4. #include <iostream>
  5. using namespace std;
  6.  
  7. int seqToIndex(vector<double>::iterator it, int r, int d)
  8. {
  9. int index = 0;
#sTvoz9 C++14 6 minutes ago
Runtime error
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int ans=0,n;
  4. vector <vector <int> > dis(1000,vector <int>(1000,0));
  5. const int dx[]={1,0,-1,0},dy[]={0,1,0,-1};
  6. bool check(int x,int y){
  7. if (x<n && x>=0 && y<n && y>=0) return true;
  8. return false;
  9. }
#jioqfd C++14 6 minutes ago
Success
  1. #include <array>
  2. #include <iostream>
  3. #include <type_traits>
  4. using namespace std;
  5.  
  6. template <typename... T>
  7. constexpr auto make_array(T&&... values) {
  8. using value_type = std::decay_t<std::common_type_t<T...>>;
  9. return std::array<value_type, sizeof...(T)>{std::forward<T>(values)...};
#l2GkBc C++14 23 minutes ago
Success
  1. #include <iostream>
  2.  
  3. typedef void(*ISSFUNC)(void*);
  4.  
  5. struct AInst
  6. {
  7. void* data;
  8. ISSFUNC func;
  9. };
#MQnCrE C++14 27 minutes ago
Success
  1. #include <tuple>
  2. using namespace std;
  3.  
  4. int main() {
  5. auto record = std::make_tuple( "John"s, "New York", 35, 'A' );
  6. std::string name; int age; char grade;
  7. auto city = std::get<1>( record );
  8. std::tie( name, std::ignore, age, grade ) = record;
  9.  
#5Zv7VM C++14 4 minutes ago
Success
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int &fun()
  5. {
  6. int x = 10;
  7. return x;
  8. }
  9. int main()
#RNiU3K C++14 29 minutes ago
Success
  1. #include <list>
  2. #include <set>
  3. #include <algorithm>
  4. #include <iostream>
  5.  
  6. using namespace std;
  7.  
  8. template<typename Iterator>
  9. void print(Iterator begin, Iterator end)