cloudspokes / arena-web

Web arena for SRMs
44 stars 32 forks source link

[a4350000000CwOMAA0, a4350000000CwOPAA0] Can't compile C++ Codes #1048

Closed sdgun closed 9 years ago

sdgun commented 9 years ago

Description

[a4350000000CwOMAA0, a4350000000CwOPAA0] Can't compile C++ Codes

Steps

  1. Hit url : https://arena.topcoder.com/#/a/home
  2. Login using your email or social sites
  3. Register for a contest
  4. Once the coding phase starts, click Enter
  5. From the problems list given in right sidebar click the link "Unopened"
  6. Once reading through the problem, click gear icon from coding area
  7. Choose the language as C++ and click OK
  8. Enter your code in coding area

    include

    include

    include

    include

    include

    include

    include

    include

    include

    include

    include

    include

    include

    include

    include

    include

    include

    include

using namespace std;

class GooseInZooDivTwo { public: int count(vector , int); };

const int md = 1000000007;

int mabs(int x) { return (x < 0 ? -x : x); }

int x[77777], y[77777];

int GooseInZooDivOne::count(vector g, int dist) { int n = g.size(), m = g[0].length(); int odd = 0, even = 0; for (int ii=0;ii<n;ii++) for (int jj=0;jj<m;jj++) if (g[ii][jj] == 'v') { int i = 1, e = 1; x[1] = ii; y[1] = jj; g[ii][jj] = '.'; while (i <= e) { for (int xx=0;xx<n;xx++) for (int yy=0;yy<m;yy++) if (g[xx][yy] == 'v') { int cur = mabs(xx-x[i])+mabs(yy-y[i]); if (cur <= dist) { e++; x[e] = xx; y[e] = yy; g[xx][yy] = '.'; } } i++; } if (e & 1) odd++; else even++; } int ans = 1; for (int i=0;i<even;i++) ans = ans2 % md; if (odd > 0) for (int i=1;i<odd;i++) ans = ans2 % md; ans = (ans+md-1) % md; return ans; }

//Powered by [KawigiEdit] 2.0!

  1. Click Compile

    Expected result

Must fix the Issue

[a4350000000CwOMAA0, a4350000000CwOPAA0] Can't compile C++ Codes

Image

31

Environment

IE 10,11, Chrome 39.0.2171.65 m, FF 33.1.1 and Safari 5.1.7 in Windows 7 Pro 64bit

Bug Hunt

Web Arena QA for 201411 Release

mdesiderio commented 9 years ago

This issue was moved to appirio-tech/arena-web#24