/in/foo.cc:1:21: warning: extra tokens at end of #include directive
#include <iostream> using namespace std; const int N = 100;int a[N], dp[N], n; int lis(int n){ int res = 0; for(int i=0; i<n; i++) { dp[i] = 1; for(int j=0; j<i; j++) if(a[j] < a[i]) dp[i] = max(dp[i], dp[j] + 1); res = max(res, dp[i]); } return res;} int lds(int n){ int res = 0; for(int i=0; i<n; i++) { dp[i] = 1; for(int j=0; j<i; j++) if(a[j] > a[i]) dp[i] = max(dp[i], dp[j] + 1); res = max(res, dp[i]); } return res;} int main(){ char ch; n = 0; while(scanf("%d%c", &a[n++], &ch)) if(ch == '\n') break; int ans1 = lds(n); cout << ans1 << "," << lis(n) - 1 << endl; return 0;}
^~~~~
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/Scrt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status