General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
5939012 Contestant:
Beket
400A - 16 GNU C++ Accepted 15 ms 8 KB 2014-03-05 20:33:55 2014-03-05 21:37:48
 
 
→ Source
// Code made by Bayemirov Beket

#include <algorithm>
// iostream is too mainstream
#include <iostream>
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cstdio>
#include <time.h>
#include <vector>
#include <ctime>
#include <cmath>
#include <map>
inline int Rand() { return (rand() << 16) | rand(); }

#define ll long long  
#define Inf 1000 * 1000 * 1000  
#define F first  
#define S second  
#define MP make_pair  
#define ull unsigned ll  
#define Pb push_back 
#define pob pop_back 
#define pof pop_front 
#define Pf push_front 
using namespace std;
vector <pair <int, int> > ans;
int n ;
string s;     
int main ()
{
    
    
    scanf ("%d", &n); 
 
 while( n --)
 {
  cin >> s;
     for (int i = 1; i <= 12; i ++)
     {
      if (12 % i != 0)
      continue;
      for (int k = 0; k < i; k ++)
      {
    bool ok = true;
    for (int j = k; j < 12; j += i)
    {
           if (s[j] != 'X')
           {
           ok = false;
          break;
          }
         }
          if (ok)
          {
           ans.push_back (make_pair (12 / i, i));
           break;
    }
        }
  } 
  
  cout << ans.size() << " ";
  for (int i = ans.size() - 1; i >= 0; i--)
   cout << ans[i].first << 'x' << ans[i].second << " ";
  cout << endl;
  ans.clear();
 
 }
 
 return 0;

}
 
 
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details